How to fix Package 'package-name' is not available, but is referred to by another package in APT
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.
Quick fix
Fixes Package 'package-name' is not available, but is referred to by another package
sudo apt-get update- Update your APT package cache
- Enable additional repositories if needed
- Search for the package or alternatives
- Remove the problematic package reference
sudo apt-get updatePackage 'package-name' is not available, but is referred to by another package
What this error means
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.
Typical symptoms
- APT operations fail when trying to install or upgrade packages
- apt-get update completes but apt-get upgrade or apt-get install fails
- Error message includes a reference to a missing package name
- System upgrade process gets stuck due to unresolvable dependencies
Common causes
- APT package cache is outdated and hasn't been refreshed after repositories removed a package
- Required repository (universe, multiverse, etc.) is disabled in your sources.list
- Package has been obsoleted or removed by upstream maintainers
- Third-party PPAs have become unavailable or removed their packages
- Partial upgrade or installation left broken dependency references
How to fix "Package 'package-name' is not available, but is referred to by another package"
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.
Advanced notes
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.
Frequently asked questions
- What does "Package 'package-name' is not available, but is referred to by another" mean?
- 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.
- How do I fix "Package 'package-name' is not available, but is referred to by another"?
- 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.
- What causes "Package 'package-name' is not available, but is referred to by another"?
- APT package cache is outdated and hasn't been refreshed after repositories removed a package Required repository (universe, multiverse, etc.) is disabled in your sources.list Package has been obsoleted or removed by upstream maintainers
- Is the "Package 'package-name' is not available, but is referred to by another" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐
- ๐
- ๐