Package Management & Updates

APT cannot resolve the requested dependencies

Held packages, pins and mixed release sources can make a dependency request impossible. Compare candidate versions and the simulated transaction.

On this page
  1. Symptoms & scope
  2. Possible causes
  3. Diagnose safely
  4. Evidence-guided next steps
  5. References & review
  6. Related problems

Symptoms & scope

  • APT prints a dependency version it cannot install.
  • A proposed repair unexpectedly removes important packages.

Relevant environment

APT-based Debian/Ubuntu system; simulations read cached package metadata and may be limited by configuration read permissions.

Recognizable messages (synthetic examples)
E: Unable to correct problems, you have held broken packages.

The wording does not establish an explicit apt-mark hold; inspect candidates, pins and the preceding dependency messages.

Possible causes

These are possible explanations, not a confirmed diagnosis. Several independent faults can coexist.

  • A held package or pin may keep a required dependency at an incompatible version.
  • Repositories from different releases or third-party vendors may offer incompatible package sets.

Diagnose safely

Run one command at a time in the relevant session. Read the explanation first. Uppercase placeholders need your own values; tools and privileges vary by distribution. These commands are displayed here and never executed by the website.

Check 1

Replace both names with the requested package and the dependency named in the error; reads cached versions and priorities.

apt-cache policy PACKAGE_NAME DEPENDENCY_NAME

Interpret the result: Check Installed, Candidate, origin and priority against the required version. A missing candidate differs from a candidate rejected by a pin.

Check 2

Replace PACKAGE_NAME with the intended target. -s simulates without installing; no sudo changes are performed.

apt-get -s install PACKAGE_NAME

Interpret the result: Inspect Inst, Conf and Remv lines and the dependency chain. Simulation cannot guarantee a later transaction if repositories or local state change.

Check 3

Lists packages explicitly held by APT without unholding them.

apt-mark showhold

Interpret the result: A listed dependency supports a hold conflict; held broken packages in an error is not proof that an explicit hold exists.

Evidence-guided next steps

Align the intended sources and package candidates

If policy shows an accidental foreign-release source or pin, save that configuration and correct only the affected source/pin to the intended supported release. Refresh metadata, repeat the simulation and apply only a reviewed transaction with compatible candidates.

Precautions: Do not force dependencies or approve removal of the desktop/kernel merely to install one optional application.

Recovery / rollback: Restore the saved source/pin; if package versions already changed, restore a coherent snapshot or a reviewed compatible package set.

Did this solution help you?

Share this solution#

Review the specific hold or incomplete local state

If the required dependency is held, confirm why before releasing only that hold and resimulating. If dpkg --audit instead shows incomplete installed dependencies, simulate apt-get -s -f install and review every removal before an administrator runs the actual repair.

Precautions: An intentional compatibility hold may be protecting another workload. Preserve the held package/version list before changes.

Recovery / rollback: Reapply the original hold; restore the pre-transaction snapshot if version changes or removals cannot be safely reversed as one compatible set.

Did this solution help you?

Share this solution#

References & review

This guide was prepared from primary project or distribution sources and reviewed on the date shown. This is an editorial source check, not evidence that a fix was reproduced on your hardware. Diagnostic log examples are synthetic fixtures. Version-dependent details must be checked against your installed release.