How to fix E: Package 'package-name' has no available version, but exists in the database in APT

APTBEGINNERMEDIUMUpdated Dec 29, 2025· 278 views

This error occurs when apt finds a package mentioned as a dependency but can't locate it in any enabled repository. Usually fixed by updating package lists, checking repository configuration, or fixing broken dependencies.

Quick fix

Fixes E: Package 'package-name' has no available version, but exists in the database

sudo apt update
  1. Update your package lists
  2. Check the package with apt-cache
  3. Enable required repositories
  4. Fix broken dependencies
apt — error
sudo apt update
E: Package 'package-name' has no available version, but exists in the database

What this error means

This error happens when the apt package manager knows a package exists (because another package depends on it or it's in the local cache), but it cannot find any installable version of that package in your currently enabled repositories. The package might have been removed from repositories you're using, exist only in disabled repositories, or be a virtual package that doesn't have an actual implementation available. APT maintains metadata about packages even after they're no longer available, which is why it knows about them but can't install them.

Typical symptoms

  • apt install or apt update fails with the 'no available version' error message
  • Dependencies cannot be resolved during installation attempts
  • Error appears when trying to install a specific package or its dependencies
  • Running apt install -f shows the same error for unmet dependencies

Common causes

  1. Your package lists are outdated and don't reflect current repository contents
  2. A required repository is disabled or has been removed from your sources.list
  3. The package only exists in a disabled repository (like universe or multiverse on Ubuntu)
  4. You're using a package mirror or PPA that no longer hosts the package
  5. The package is a transitional or virtual package without a real implementation
  6. Your system has mixed packages from incompatible Ubuntu/Debian versions

How to fix "E: Package 'package-name' has no available version, but exists in the database"

1Update your package lists

The most common cause is stale package metadata. Update apt's cache to reflect current repository contents:

bash
sudo apt update

Try your installation again after updating. If you're still seeing the error, proceed to the next step.

2Check the package with apt-cache

Use apt-cache to get detailed information about the package:

bash
apt-cache show package-name
apt-cache policy package-name

This shows which repositories know about the package and what versions are available. If output is empty, the package doesn't exist in any enabled repository.

3Enable required repositories

On Ubuntu systems, some packages live in disabled repositories. Enable them based on your needs:

bash
# Enable universe repository
sudo add-apt-repository universe

# Enable multiverse repository (for restricted software)
sudo add-apt-repository multiverse

# Then update
sudo apt update

On Debian, check if your sources.list needs additional entries for backports or testing versions.

4Fix broken dependencies

If the error appears as part of broken dependency chains, use apt's built-in repair:

bash
sudo apt --fix-broken install

Or alternatively:

bash
sudo apt install -f

This attempts to automatically resolve dependency conflicts by removing or installing packages as needed.

5Clean and rebuild the package cache

A corrupted cache can cause this issue. Clear it and rebuild:

bash
sudo apt clean
sudo apt autoclean
sudo apt update

If this still doesn't work, do a deeper cache rebuild:

bash
sudo rm -r /var/lib/apt/lists/*
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt update

Be careful with the second method—ensure you include the wildcard at the end.

6Reconfigure dpkg if package installation is corrupted

If your system has partially installed or corrupted packages, reconfigure dpkg:

bash
sudo dpkg --configure -a

This attempts to configure any packages that were unpacked but not fully installed, which sometimes resolves dependency database corruption.

Advanced notes

If you're seeing this error with a package that appears in multiple Ubuntu/Debian versions, you may have mixed version packages on your system. Check your sources.list and PPAs for conflicting version specifications. You can use 'apt-cache search package-name' to find alternative packages or newer package names if the one you're looking for has been renamed or superseded.

For PPA packages, the error often indicates the PPA doesn't support your current Ubuntu version. Check the PPA maintainer's documentation or search for alternatives for your specific Ubuntu release.

If using Docker or other containerized environments, ensure your base image's repository sources are compatible with the packages you're trying to install.

Frequently asked questions

What does "E: Package 'package-name' has no available version, but exists in the" mean?
This error happens when the apt package manager knows a package exists (because another package depends on it or it's in the local cache), but it cannot find any installable version of that package in your currently enabled repositories. The package might have been removed from repositories you're using, exist only in disabled repositories, or be a virtual package that doesn't have an actual implementation available. APT maintains metadata about packages even after they're no longer available, which is why it knows about them but can't install them.
How do I fix "E: Package 'package-name' has no available version, but exists in the"?
This error occurs when apt finds a package mentioned as a dependency but can't locate it in any enabled repository. Usually fixed by updating package lists, checking repository configuration, or fixing broken dependencies.
What causes "E: Package 'package-name' has no available version, but exists in the"?
Your package lists are outdated and don't reflect current repository contents A required repository is disabled or has been removed from your sources.list The package only exists in a disabled repository (like universe or multiverse on Ubuntu)
Is the "E: Package 'package-name' has no available version, but exists in the" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading