Fix "Unable to correct problems, you have held broken packages"

Quick fix

Refresh the package lists, let apt repair any partial installs, then ask apt to install the dependency it complains about so it tells you the real conflict:

sudo apt update
sudo apt -f install
apt-mark showhold
sudo apt install PACKAGE DEPENDENCY-FROM-THE-ERROR

The usual culprit is a PPA or third-party repository whose packages do not match your release. Removing or downgrading those packages fixes most cases.

What the error means

$ sudo apt install libreoffice
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libreoffice-core : Depends: libicu74 (>= 74.1-1~) but it is not installable
                    Depends: libpython3.12t64 (>= 3.12.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt's solver could not find a set of package versions that satisfies every dependency at once. Two phrases matter:

  • "but it is not installable": no enabled repository offers that dependency at all. The package you are installing was built for a different release.
  • "but it is not going to be installed": the dependency exists, but installing it would conflict with something else. The real blocker is one level deeper.

Despite the wording, you usually have not "held" anything. Newer apt 3.x releases print a clearer explanation of the conflict chain; read it top to bottom.

Step 1: find the real blocker

Install the dependency named in the error by itself. apt then reports the next layer down:

sudo apt install libpython3.12t64
apt-cache policy libpython3.12t64 libreoffice-core

Example output:

libreoffice-core:
  Installed: (none)
  Candidate: 4:25.8.2-0ubuntu0.26.04.1~ppa1
  Version table:
     4:25.8.2-0ubuntu0.26.04.1~ppa1 500
        500 https://ppa.launchpadcontent.net/libreoffice/ppa/ubuntu resolute/main amd64 Packages
     4:25.8.1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages

apt-cache policy shows where each candidate version comes from. If the candidate comes from a PPA or third-party repo, that repo is the likely cause.

Cause 1: a PPA or third-party repository

PPAs and vendor repositories replace official libraries with newer versions. When the PPA is out of date, built for another Ubuntu release, or half-removed, its packages pin dependencies that the official archive cannot satisfy. List what is installed from outside the official archive:

ls /etc/apt/sources.list.d/
# installed packages not from the official archive (use Debian instead of Ubuntu on Debian)
apt list '?installed ?not(?origin(Ubuntu))'

Revert a PPA's packages to the official versions and disable it:

sudo apt install ppa-purge
sudo ppa-purge ppa:owner/name

Or remove the conflicting package and reinstall the official one with an explicit version: sudo apt install libfoo=VERSION using the version shown by apt-cache policy.

Cause 2: a .deb or repository for a different release

A .deb downloaded for Ubuntu 22.04 or Debian 12, or a sources entry with the wrong codename, asks for library versions your release does not have ("not installable"). Check that every source uses your codename:

lsb_release -cs
grep -rh -E '^(Suites|deb )' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null

On Ubuntu 26.04 every suite should read resolute, resolute-updates, resolute-security or resolute-backports; on Debian 13, trixie variants. Remove or fix lines for other releases, run sudo apt update, and download the .deb built for your release.

Do not mix Debian and Ubuntu, or stable and testing

Adding Debian repositories to Ubuntu, or forky/sid lines to Debian 13 stable, is the fastest way to a system apt can no longer repair. Use backports or Flatpak instead.

Cause 3: packages really are on hold

apt-mark showhold
dpkg --get-selections | grep hold

A held package cannot be upgraded, so anything requiring its newer version fails. Release the hold if you no longer need it:

sudo apt-mark unhold PACKAGE
sudo apt update && sudo apt full-upgrade

Also check for pins in /etc/apt/preferences and /etc/apt/preferences.d/, which can have the same effect.

Cause 4: an incomplete or interrupted upgrade

If an earlier install or upgrade failed, some packages are half-configured and the solver refuses to go further. Repair first:

sudo dpkg --configure -a
sudo apt --fix-broken install
sudo apt full-upgrade

When apt --fix-broken install itself ends in a dpkg failure, follow "dpkg returned an error code (1)". If apt reports E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)., run that command exactly as written, without a package name.

Cause 5: Ubuntu phased updates and kept-back packages

Ubuntu rolls out some updates to a percentage of machines at a time. During that window apt upgrade shows The following upgrades have been deferred due to phasing or "kept back", and installing a package that needs the newest version of a phased library can fail. Waiting a day or two is the intended fix. To get the update immediately for one package:

sudo apt install --only-upgrade PACKAGE

"Kept back" alone is not an error; sudo apt full-upgrade installs upgrades that need new dependencies or removals.

Using aptitude for a second opinion

Before reaching for another tool, make sure you know the standard apt options covered in the apt package manager guide, especially apt-cache policy, apt-mark and full-upgrade.

aptitude has a different solver that offers alternatives:

sudo apt install aptitude
sudo aptitude install PACKAGE

It prints a proposed solution and asks Accept this solution? [Y/n/q/?]. Press n to see the next proposal if the first wants to remove important packages. Never accept a solution that removes ubuntu-desktop, systemd or your kernel without understanding why.

Distro notes and prevention

  • Linux Mint 22.3 uses Ubuntu 24.04 (noble) packages, so PPAs must target noble, not Mint's own codename.
  • Debian 13: use trixie-backports for newer software (sudo apt install -t trixie-backports PACKAGE) rather than testing.
  • Fedora DNF5 reports the same situation as Problem: conflicting requests or nothing provides ...; sudo dnf distro-sync or --allowerasing are the usual fixes. Arch reports unable to satisfy dependency, usually a sign of a partial upgrade: run sudo pacman -Syu.
  • Remove PPAs you do not need before a release upgrade, as the Ubuntu upgrade guide recommends.
  • Prefer Flatpak or Snap for apps that want newer libraries than your release ships.

Frequently asked questions

Does "held broken packages" mean I put a hold on something?

Not necessarily. apt uses "held" loosely: it usually means the solver decided to keep some package at its current version because upgrading it would break something else. Check real holds with apt-mark showhold.

Is it safe to use aptitude to fix broken packages?

aptitude proposes alternative solutions, and the first one is often "remove lots of packages". Read each proposal before accepting; press n to see the next one.

Why does apt say packages have been kept back?

"Kept back" during apt upgrade means an upgrade needs new packages or removals, or on Ubuntu that the update is being phased in gradually. It is not an error; sudo apt full-upgrade or simply waiting resolves it.

Should I install packages from an older Ubuntu release to fix dependencies?

No. Mixing releases is a leading cause of this error. Use the version from your own release, a backport, a Flatpak or a container instead.

Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.