How to fix Depends: package-name (>= version) but version is to be installed in APT
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- Update package lists and repository metadata
- Check the specific version requirements
- Check if any packages are held
- Verify your repository configuration
sudo apt updateDepends: 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
- 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
- A package is held at a specific version that is incompatible with other packages you want to install
- Third-party PPAs or repositories provide packages with conflicting version requirements
- System has not been updated recently and repository metadata is stale
How to fix "Depends: package-name (>= version) but version is to be installed"
First, refresh your package repository information to ensure apt has the latest available versions:
sudo apt updateThis downloads the latest package lists from all configured repositories. Outdated metadata can cause apt to see incorrect version information.
Run the installation command again to see the exact version mismatch:
sudo apt-get install package-nameNote 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:
apt-cache policy problematic-packageThis shows all available versions of the package and which one is installed.
A held package might be preventing apt from installing the required version:
sudo apt-mark showholdIf the package with the version mismatch appears in the held list, unhold it:
sudo apt-mark unhold package-nameThen retry the installation.
Check which repositories are enabled and their priorities:
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:
lsb_release -csShows your current distribution release codename.
The conflicting package might be available in a newer version after a system upgrade:
sudo apt upgradeIf full upgrade suggests removing other packages, you can use:
sudo apt full-upgradeThis may upgrade other packages to compatible versions. Review what changes are proposed before confirming.
Search for the package with an acceptable version:
apt-cache search "^package-name$"
apt-cache depends package-nameYou can also explicitly request a specific version:
sudo apt-get install package-name=version-numberReplace "version-number" with a version that meets the ">=" requirement shown in the error.
If apt cannot resolve the conflict, aptitude often finds solutions:
sudo aptitude install package-nameWhen aptitude encounters conflicts, it will prompt you with multiple solutions. You can also see why a package cannot be installed:
sudo aptitude why-not package-nameThis shows the exact dependency chain causing the conflict.
If no compatible version exists in your repositories, you may need to remove the package requiring the higher version and find an alternative:
sudo apt remove package-requiring-higher-versionThen 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
- 📚APT Official Documentation
- 📖Debian Wiki - APT Preferences(Official Docs)
- 📖Aptitude Manual - Dependency Resolution(Official Docs)