How to fix Depends: package-name (>= version) but version is to be installed in APT

APTINTERMEDIATEMEDIUMUpdated Dec 29, 2025· 182 views

This error occurs when apt detects that a package dependency requires a specific minimum version, but apt is attempting to install a different (usually lower) version. It indicates a version mismatch between what a package needs and what is available to install, preventing the installation from proceeding.

Quick fix

Fixes Depends: package-name (>= version) but version is to be installed

sudo apt update
  1. Update package lists and repository metadata
  2. Check the specific version requirements
  3. Check if any packages are held
  4. Verify your repository configuration
apt — error
sudo apt update
Depends: package-name (>= version) but version is to be installed

What this error means

When you try to install or upgrade a package, apt performs dependency resolution to ensure all required packages and their versions are available. This error appears when apt finds a package that explicitly requires another package at version X or higher, but the version available to install is lower than X. This is a hard constraint violation—the package cannot function with a lower version of its dependency. The version number in parentheses (e.g., ">= 2.0") specifies the minimum required version, while the second "version" is what apt would install instead. This typically happens due to outdated repositories, held packages, or conflicting version requirements from multiple packages.

Typical symptoms

  • Installation fails with explicit version requirement message when trying apt-get install
  • Upgrade attempts are blocked due to conflicting version requirements
  • Only specific package names show in the error, not all dependencies
  • Manual specification of package versions does not resolve the issue
  • System package repositories appear to have outdated or inconsistent versions

Common causes

  1. Package repository contains outdated versions that do not meet newer package dependencies
  2. Multiple packages require incompatible minimum versions of the same dependency
  3. Using a mix of stable, testing, and unstable Debian repositories with version mismatches
  4. A package is held at a specific version that is incompatible with other packages you want to install
  5. Third-party PPAs or repositories provide packages with conflicting version requirements
  6. System has not been updated recently and repository metadata is stale

How to fix "Depends: package-name (>= version) but version is to be installed"

1Update package lists and repository metadata

First, refresh your package repository information to ensure apt has the latest available versions:

bash
sudo apt update

This downloads the latest package lists from all configured repositories. Outdated metadata can cause apt to see incorrect version information.

2Check the specific version requirements

Run the installation command again to see the exact version mismatch:

bash
sudo apt-get install package-name

Note the exact version numbers mentioned in the error. This tells you which package is too old and what minimum version is required. You can also use apt-cache to inspect versions:

bash
apt-cache policy problematic-package

This shows all available versions of the package and which one is installed.

3Check if any packages are held

A held package might be preventing apt from installing the required version:

bash
sudo apt-mark showhold

If the package with the version mismatch appears in the held list, unhold it:

bash
sudo apt-mark unhold package-name

Then retry the installation.

4Verify your repository configuration

Check which repositories are enabled and their priorities:

bash
grep -r "^deb" /etc/apt/sources.list /etc/apt/sources.list.d/

If you are mixing repositories from different Debian/Ubuntu releases (e.g., focal and jammy), this can cause version conflicts. Consider using repositories from the same release channel:

bash
lsb_release -cs

Shows your current distribution release codename.

5Try upgrading the system

The conflicting package might be available in a newer version after a system upgrade:

bash
sudo apt upgrade

If full upgrade suggests removing other packages, you can use:

bash
sudo apt full-upgrade

This may upgrade other packages to compatible versions. Review what changes are proposed before confirming.

6Use apt-cache to find compatible versions

Search for the package with an acceptable version:

bash
apt-cache search "^package-name$"
apt-cache depends package-name

You can also explicitly request a specific version:

bash
sudo apt-get install package-name=version-number

Replace "version-number" with a version that meets the ">=" requirement shown in the error.

7Use aptitude for more sophisticated dependency resolution

If apt cannot resolve the conflict, aptitude often finds solutions:

bash
sudo aptitude install package-name

When aptitude encounters conflicts, it will prompt you with multiple solutions. You can also see why a package cannot be installed:

bash
sudo aptitude why-not package-name

This shows the exact dependency chain causing the conflict.

8Consider removing or replacing the conflicting dependency

If no compatible version exists in your repositories, you may need to remove the package requiring the higher version and find an alternative:

bash
sudo apt remove package-requiring-higher-version

Then try installing your desired package. Alternatively, enable backports or a newer repository channel if available for your distribution.

Advanced notes

This error is fundamentally about version constraints that cannot be satisfied by available packages. The version requirement syntax (e.g., ">= 2.0") is part of Debian packaging standards and cannot be bypassed without modifying packages themselves. If you encounter this frequently, consider: 1) Using a rolling-release distribution like Debian Testing or Unstable, 2) Building packages from source to ensure version compatibility, 3) Using containerization (Docker) to isolate different version requirements, or 4) Pinning specific repository versions in /etc/apt/preferences.d/. Always avoid mixing stable and unstable Debian repositories unless you fully understand the consequences. If you are a package maintainer, this error in your users' systems indicates your package has overly strict version requirements that may not be necessary.

Frequently asked questions

What does "Depends: package-name (>= version) but version is to be installed" mean?
When you try to install or upgrade a package, apt performs dependency resolution to ensure all required packages and their versions are available. This error appears when apt finds a package that explicitly requires another package at version X or higher, but the version available to install is lower than X. This is a hard constraint violation—the package cannot function with a lower version of its dependency.
How do I fix "Depends: package-name (>= version) but version is to be installed"?
This error occurs when apt detects that a package dependency requires a specific minimum version, but apt is attempting to install a different (usually lower) version. It indicates a version mismatch between what a package needs and what is available to install, preventing the installation from proceeding.
What causes "Depends: package-name (>= version) but version is to be installed"?
Package repository contains outdated versions that do not meet newer package dependencies Multiple packages require incompatible minimum versions of the same dependency Using a mix of stable, testing, and unstable Debian repositories with version mismatches
Is the "Depends: package-name (>= version) but version is to be installed" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading