How to fix The following packages have unmet dependencies in APT

APTINTERMEDIATEMEDIUMUpdated Dec 29, 2025ยท 481 views

This error occurs when apt tries to install a package but cannot find compatible versions of its required dependencies. Common causes include incompatible package versions, corrupted package cache, or held packages. Resolving it typically involves updating repositories, fixing broken packages, or removing conflicting packages.

Quick fix

Fixes The following packages have unmet dependencies

sudo apt update
  1. Update your package repositories
  2. Try apt upgrade and apt fix-broken install
  3. Use apt dist-upgrade for complex dependency issues
  4. Check for held packages
apt โ€” error
sudo apt update
The following packages have unmet dependencies

What this error means

When apt encounters unmet dependencies, it means the package you are trying to install depends on other packages that either do not exist in your repositories, have incompatible versions, or have broken dependency chains. This can happen when upgrading a system with outdated packages, installing from third-party PPAs with conflicting versions, or when the package cache becomes corrupted. Apt refuses to proceed with the installation to prevent leaving your system in an inconsistent or broken state.

Typical symptoms

  • apt install or apt upgrade fails with "The following packages have unmet dependencies" message
  • Installation of a specific package is blocked because its dependencies cannot be satisfied
  • System upgrade (apt upgrade or apt dist-upgrade) stops and requires manual intervention
  • Package manager shows broken packages or uninstallable packages
  • Error includes a list of package names with version requirements that cannot be met
  • Running apt install on any package fails with similar dependency errors

Common causes

  1. Package repositories contain incompatible versions of dependencies (especially with PPAs)
  2. Package cache is corrupted or contains stale metadata (requires apt cache refresh)
  3. Packages are held back using apt-mark hold, preventing upgrades or removals needed to resolve dependencies
  4. Third-party repositories provide packages built for different Ubuntu/Debian versions
  5. System is missing packages from a repository that was removed or disabled
  6. Installation of newer versions of packages that break compatibility with older installed packages
  7. Multiple PPAs providing conflicting versions of the same package

How to fix "The following packages have unmet dependencies"

1Update your package repositories

Start by refreshing your package lists to ensure apt has current information about available packages and versions:

bash
sudo apt update

This fetches the latest package metadata from your configured repositories. After running this, try your installation again, as the issue may have been caused by stale cache.

2Try apt upgrade and apt fix-broken install

Upgrade your currently installed packages to their latest compatible versions, then attempt to fix any broken dependencies:

bash
sudo apt upgrade
sudo apt --fix-broken install

The --fix-broken option tells apt to resolve dependency issues by removing conflicting packages if necessary. This often resolves unmet dependencies caused by partial upgrades.

3Use apt dist-upgrade for complex dependency issues

If regular upgrade does not work, use dist-upgrade, which performs a more aggressive upgrade and is better at resolving dependency conflicts:

bash
sudo apt dist-upgrade

Note that dist-upgrade may remove packages to resolve conflicts, so review the output carefully before confirming. For production systems, test this on a non-critical environment first.

4Check for held packages

Held packages prevent apt from modifying them to resolve dependencies. List any held packages:

bash
apt-mark showhold

If you see packages listed, consider unholding them temporarily to allow apt to resolve dependencies:

bash
sudo apt-mark unhold <package-name>

After resolving the dependency issue, you can hold the package again if desired.

5Remove problematic packages (as a last resort)

If the above steps fail, you may need to remove the conflicting package. First, simulate the removal with a dry-run to see what would be removed:

bash
sudo apt remove --dry-run <package-name>

If the output looks safe, proceed with the actual removal:

bash
sudo apt remove <package-name>

Then try installing the package you originally wanted.

6Clean apt cache if all else fails

As a nuclear option, clear the apt cache and reinstall the problematic package:

bash
sudo apt clean
sudo apt autoclean
sudo apt install --reinstall <package-name>

This removes all cached package files and forces apt to re-download and verify them. Use this only after other solutions have failed, as it forces a fresh installation of the entire package and its dependencies.

7Review and manage third-party repositories (PPAs)

If the error persists, check if you have third-party PPAs that provide conflicting packages:

bash
ls /etc/apt/sources.list.d/

Disable or remove problematic PPAs by renaming their files or removing them entirely:

bash
sudo mv /etc/apt/sources.list.d/problematic-ppa.list /etc/apt/sources.list.d/problematic-ppa.list.bak
sudo apt update

Then try your installation again. PPAs from different maintainers often have conflicting package versions.

Advanced notes

For systems with multiple PPAs, dependency conflicts are common because different maintainers may build packages for different Ubuntu/Debian versions or have different dependency requirements. Use apt-cache policy <package> to see which version will be installed and from which repository. The package manager aptitude (install with sudo apt install aptitude) offers more advanced dependency resolution than apt-get and can sometimes resolve conflicts that apt cannot. Debug held packages with sudo apt -o Debug::pkgProblemResolver=yes dist-upgrade to see the full decision-making process. In Docker containers, always run apt update before installing packages to prevent stale cache issues. For multi-architecture systems (amd64/i386/arm64), ensure you understand architecture-specific dependencies, as mixing architectures can cause unmet dependency errors.

Frequently asked questions

What does "The following packages have unmet dependencies" mean?
When apt encounters unmet dependencies, it means the package you are trying to install depends on other packages that either do not exist in your repositories, have incompatible versions, or have broken dependency chains. This can happen when upgrading a system with outdated packages, installing from third-party PPAs with conflicting versions, or when the package cache becomes corrupted. Apt refuses to proceed with the installation to prevent leaving your system in an inconsistent or broken state.
How do I fix "The following packages have unmet dependencies"?
This error occurs when apt tries to install a package but cannot find compatible versions of its required dependencies. Common causes include incompatible package versions, corrupted package cache, or held packages. Resolving it typically involves updating repositories, fixing broken packages, or removing conflicting packages.
What causes "The following packages have unmet dependencies"?
Package repositories contain incompatible versions of dependencies (especially with PPAs) Package cache is corrupted or contains stale metadata (requires apt cache refresh) Packages are held back using apt-mark hold, preventing upgrades or removals needed to resolve dependencies
Is the "The following packages have unmet dependencies" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading