How to fix E: Package 'package-name' has no installation candidate in APT
This error occurs when apt cannot find a package in your configured repositories. It typically means the package is unavailable for your Ubuntu/Debian version, or your package lists are outdated.
Quick fix
Fixes E: Package 'package-name' has no installation candidate
sudo apt update- Update your package cache
- Verify the exact package name
- Check your enabled repositories
- Install from a PPA if needed (Ubuntu)
sudo apt updateE: Package 'package-name' has no installation candidate
What this error means
The "Package 'package-name' has no installation candidate" error indicates that apt has found a reference to the package in its database, but cannot locate any available version that can be installed on your system. This happens because apt cannot find the package in any of the enabled repositories, which could be due to several reasons: your package cache is out of date, the required repository is not enabled, the package has been renamed or removed, or the package is not available for your specific system architecture or OS version.
Typical symptoms
- apt-get install fails with the 'no installation candidate' message
- Specific packages cannot be found even though you know they exist
- Some packages work but others don't, suggesting selective availability issues
- Error appears when trying to install common packages like vim, gcc, or python3
Common causes
- Package cache is outdated and hasn't been synced with remote repositories
- Required repository (like universe, multiverse, or a PPA) is not enabled in your sources list
- Package is only available for a newer or older version of Ubuntu/Debian
- Package has been renamed, replaced, or removed from the repository
- Typo in the package name (case-sensitive)
- System architecture doesn't match the package availability (e.g., 32-bit vs 64-bit)
- Repository configuration is corrupted or has commented-out lines in /etc/apt/sources.list
How to fix "E: Package 'package-name' has no installation candidate"
The most common cause is an outdated package list. Update apt's cache to sync with remote repositories:
sudo apt updateThis downloads the latest package lists from all enabled repositories. After running this, try installing the package again:
sudo apt install package-nameIf this fixes the issue, the problem was simply an outdated cache.
Package names in Linux are case-sensitive. Verify you're using the correct name:
apt search package-nameThis searches for packages matching your query. Look for the exact name you need. For example, if you're looking for Python 3, the package is python3, not Python3 or python.
You can also check the Ubuntu Package Search online at https://packages.ubuntu.com/
View which repositories are currently enabled:
cat /etc/apt/sources.listLook for commented-out lines (starting with #). Some repositories like universe and multiverse are not enabled by default on all Ubuntu installations.
To enable the universe repository:
sudo add-apt-repository universe
sudo apt updateTo enable multiverse:
sudo add-apt-repository multiverse
sudo apt updateIf a package is only available in a newer version of Ubuntu, you can try using a Personal Package Archive (PPA) that provides a backport:
sudo add-apt-repository ppa:repository-name
sudo apt update
sudo apt install package-nameFor example, to get newer versions of common tools, search for the package on launchpad.net to find the appropriate PPA.
If the package still isn't available, consider alternatives:
For Ubuntu/Debian, try snap packages:
sudo snap install package-nameFor development tools, check if the project provides direct downloads or uses other package managers like pip, npm, or cargo:
# Python packages
pip install package-name
# Node.js packages
npm install -g package-nameAdvanced notes
For older Ubuntu versions, use the ubuntu-backports repository to access newer packages:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-backports main restricted universe multiverse"
sudo apt updateIf you're using non-standard Ubuntu flavors (Linux Mint, Elementary OS, etc.), the repository URLs may differ. Check your distribution's documentation for the correct repositories.
On Debian, ensure you have the correct entries for your release (stable, testing, sid). Using packages from testing or sid on a stable system can cause conflicts and broken dependencies.
Frequently asked questions
- What does "E: Package 'package-name' has no installation candidate" mean?
- The "Package 'package-name' has no installation candidate" error indicates that apt has found a reference to the package in its database, but cannot locate any available version that can be installed on your system. This happens because apt cannot find the package in any of the enabled repositories, which could be due to several reasons: your package cache is out of date, the required repository is not enabled, the package has been renamed or removed, or the package is not available for your specific system architecture or OS version.
- How do I fix "E: Package 'package-name' has no installation candidate"?
- This error occurs when apt cannot find a package in your configured repositories. It typically means the package is unavailable for your Ubuntu/Debian version, or your package lists are outdated.
- What causes "E: Package 'package-name' has no installation candidate"?
- Package cache is outdated and hasn't been synced with remote repositories Required repository (like universe, multiverse, or a PPA) is not enabled in your sources list Package is only available for a newer or older version of Ubuntu/Debian
- Is the "E: Package 'package-name' has no installation candidate" 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
- ๐Debian Wiki: Debian Repository(Official Docs)
- ๐Ubuntu Community: Repositories(Official Docs)
- ๐Ubuntu Package Search(Official Docs)