This error occurs when apt package metadata files become corrupted or fail to download properly. Rebuilding the package cache by removing corrupted files and running apt update resolves the issue in most cases.
Fixes E: The package lists or status file could not be parsed or opened
sudo rm /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_InReleasesudo rm /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_InReleaseE: The package lists or status file could not be parsed or opened
The apt package manager stores cached package metadata in /var/lib/apt/lists/. When these files become corrupted—either from interrupted downloads, network issues, storage problems, or manual modifications—apt cannot parse them during update operations. This causes the system to reject the entire cache and prevents package installation or updates until the corrupted files are removed and regenerated.
Read the error message carefully. It will show a path like /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_InRelease. This tells you which file is corrupted.
If only one or two files are mentioned, remove just those:
sudo rm /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_InReleaseReplace the path with the actual corrupted file from your error message.
Run apt update to download fresh metadata:
sudo apt updateThis command rebuilds the cache from scratch. Even though you removed files, apt will recreate them during this operation.
If the error mentions many corrupted files, it's faster to remove everything:
sudo rm -rf /var/lib/apt/lists/*
sudo apt updateImportant: Remove the contents of the directory, but NOT the directory itself. The system needs the /var/lib/apt/lists/ directory to exist.
Try installing or updating a package to confirm the issue is resolved:
sudo apt install curlIf this succeeds without parsing errors, your cache is healthy.
For status file corruption specifically, apt keeps backups in /var/backups/. If /var/lib/dpkg/status is corrupted, you can restore from the backup: sudo cp /var/backups/apt.extended_states.0 /var/lib/apt/extended_states. Storage issues on SD cards or unreliable drives can cause persistent corruption. If this error keeps recurring, run a filesystem check: sudo fsck /. Also check sources.list for broken PPAs or repositories that may have incorrect structure—remove those and retry apt update.