This error occurs when APT finds a dependency on a package that no longer exists in your repositories. The package may have been removed, renamed, or moved to a disabled repository.
APT package management uses a dependency graph where packages can depend on, suggest, or recommend other packages. This error means that at least one package in your system requires or references another package that APT cannot locate in any enabled repository. This typically happens after major system updates, repository changes, or when package maintainers remove packages from circulation.
First, refresh APT's metadata from all enabled repositories to ensure it has the latest package information:
sudo apt-get updateThis command fetches the latest package lists from your repositories. If the missing package has already been removed upstream, this will clear it from APT's records.
Some packages are provided by the universe or multiverse repositories, which may be disabled on minimal installations. Enable them:
sudo add-apt-repository universe
sudo apt-get updateIf multiverse is also needed:
sudo add-apt-repository multiverse
sudo apt-get updateUse apt-cache to search for the specific package name or similar alternatives:
apt-cache search package-nameThis helps identify if the package exists under a different name, has been renamed, or if a replacement package is available.
You can also check the package details:
apt-cache show package-nameIf the missing package truly no longer exists and isn't needed, remove any packages that depend on it:
sudo apt-get remove package-nameIf you don't know which package references it, try:
sudo apt-get autoremoveThis removes packages that are no longer needed.
Check your /etc/apt/sources.list file and any files in /etc/apt/sources.list.d/ for outdated or broken repository entries:
sudo nano /etc/apt/sources.listComment out or remove lines pointing to unavailable repositories. Then run:
sudo apt-get updateYou can also use:
sudo apt-get autoremoveto clean up any lingering package metadata.
If this error persists after updating, the most likely cause is a third-party PPA or repository that has been removed or is no longer maintained. Check /etc/apt/sources.list.d/ for .list files from PPAs and remove them if they reference outdated repositories. Some organizations maintain 'meta-packages' that depend on many sub-packages; if the meta-package is removed but the dependency isn't updated, you'll see this error. In rare cases, on systems with many custom packages, you may need to manually edit the APT state files at /var/lib/apt/lists/, but this should only be done as a last resort and with caution.
E: Could not connect to proxy server
Could not connect to proxy server
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt
E: The value 'value' is invalid for APT::Default-Release
How to fix invalid APT::Default-Release value in APT
dpkg: error: unable to create new file 'path': Permission denied
How to fix dpkg permission denied errors in APT
subprocess installed post-removal script returned error exit status 1
How to fix "subprocess installed post-removal script returned error exit status 1" in APT