How to fix Depends: package-name but it is not going to be installed in APT

APTINTERMEDIATEHIGHUpdated Dec 29, 2025ยท 344 views

APT cannot resolve package dependencies because required packages are unavailable, have version conflicts, or are held. This typically occurs with conflicting PPAs, version mismatches, or incompatible repositories.

Quick fix

Fixes Depends: package-name but it is not going to be installed

sudo apt --fix-broken install
  1. Run apt fix-broken install to auto-resolve dependencies
  2. Identify the conflicting package
  3. Check held packages
  4. Disable conflicting PPAs
apt โ€” error
sudo apt --fix-broken install
Depends: package-name but it is not going to be installed

What this error means

This error means APT's dependency resolver has detected that a package you're trying to install depends on another package that either: 1. **Doesn't exist** in your configured repositories 2. **Has a version conflict** with another installed package 3. **Is held** (marked as do-not-upgrade) 4. **Conflicts with** other packages that would be installed APT is informing you that it cannot complete the installation because the dependency chain is broken. The "not going to be installed" part indicates that APT has given up trying to automatically resolve this particular dependency.

Typical symptoms

  • apt install command fails with unmet dependencies message
  • apt update succeeds but apt install fails
  • Error messages showing package name followed by "but it is not going to be installed"
  • Cannot upgrade or install new packages
  • Works fine until after adding a new PPA or repository

Common causes

  1. Conflicting PPAs or additional repositories that provide incompatible package versions
  2. Version mismatch between a required dependency and what is available in your repositories
  3. Attempting to install packages from wrong distribution version (e.g., Ubuntu 22.04 packages on 20.04)
  4. A package is held (marked as do-not-upgrade) which blocks dependent packages
  5. Repository contains broken packages or incomplete dependency information
  6. System disk space or RAM is insufficient for dependency resolution

How to fix "Depends: package-name but it is not going to be installed"

1Run apt fix-broken install to auto-resolve dependencies

Run this command to let APT attempt automatic dependency resolution:

bash
sudo apt --fix-broken install

If that doesn't work, also try reconfiguring packages:

bash
sudo dpkg --configure -a

This forces the package manager to verify all package relationships.

2Identify the conflicting package

From the error message, identify which package cannot be installed. For example:

bash
Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed

The conflicting package is libc6 with a version mismatch. Note the exact package name and version requirement.

3Check held packages

Some packages may be held (marked to not upgrade). List held packages:

bash
apt-mark showhold

If a held package is causing the conflict, you can unhold it:

bash
sudo apt-mark unhold package-name

Then try the install again.

4Disable conflicting PPAs

If the error started after adding a PPA, disable it:

Using GUI (Ubuntu Desktop):
- Open "Software & Updates"
- Go to "Other Software" tab
- Find and uncheck the problematic PPA

Using command line:

bash
sudo add-apt-repository --remove ppa:username/ppaname
sudo apt-get update

After removing the PPA, try installing again.

5Use aptitude for advanced dependency resolution

aptitude has better conflict resolution than apt. Install it:

bash
sudo apt-get install aptitude

Then try installing your package with aptitude:

bash
sudo aptitude install package-name

Aptitude will often find solutions that apt cannot. If it offers alternative packages, review and accept them.

6Verify correct distribution version

Ensure you are installing packages for your distribution. Check your Ubuntu/Debian version:

bash
lsb_release -a

or

bash
cat /etc/os-release

Make sure any packages or PPAs you add are compatible with your version. For example, don't install Ubuntu 22.04 packages on a 20.04 system.

Advanced notes

Understanding Version Pinning: When a package specifies "Depends: libname (= exact.version)", it requires an exact version match. If your system has a different version installed, the dependency cannot be satisfied without downgrading or upgrading that library.

PPA Conflicts: PPAs (Personal Package Archives) often contain newer or different versions of packages than official repositories. Having multiple conflicting PPAs can cause version conflicts that APT cannot resolve. It's best to keep PPA use minimal and from trusted sources.

Rootless/Container Environments: In Docker containers or restricted environments, dependency resolution may fail differently. Ensure the base image has the correct repositories configured.

Repository Priority: If you have multiple repositories providing the same package, APT may select versions in unexpected ways. Use apt-cache policy package-name to see which version APT prefers and from which repository.

Frequently asked questions

What does "Depends: package-name but it is not going to be installed" mean?
This error means APT's dependency resolver has detected that a package you're trying to install depends on another package that either: 1. Doesn't exist in your configured repositories 2. Has a version conflict with another installed package 3.
How do I fix "Depends: package-name but it is not going to be installed"?
APT cannot resolve package dependencies because required packages are unavailable, have version conflicts, or are held. This typically occurs with conflicting PPAs, version mismatches, or incompatible repositories.
What causes "Depends: package-name but it is not going to be installed"?
Conflicting PPAs or additional repositories that provide incompatible package versions Version mismatch between a required dependency and what is available in your repositories Attempting to install packages from wrong distribution version (e.g., Ubuntu 22.04 packages on 20.04)
Is the "Depends: package-name but it is not going to be installed" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading