How to Fix “Unable to correct problems, you have held broken packages” in Ubuntu

HOW TO FIX You Have Held Broken Packages ERROR IN LINUX

APT reports the message below when it cannot choose a consistent set of package versions for the request.

E: Unable to correct problems, you have held broken packages

A held package can cause that conflict, yet the message also appears when a repository, package version, interrupted dpkg configuration, or requested package dependency blocks the solver. The rest of the error output names the package relationship that needs inspection.

Start with diagnostics, then repair the package database only after you can see the package and version involved. Debian’s apt-get documentation describes –fix-broken as an in-place dependency repair, and its apt-mark documentation defines the hold and unhold states. Those commands do not justify removing packages without reading APT’s proposal.

Find the package that blocks APT

Keep the full error output from the failed install. The useful line usually names a package, a required version, and a version that APT refuses to install.

sudo dpkg --audit
sudo apt-get check
apt-mark showhold

dpkg –audit reports packages that need configuration or other repair. apt-get check checks dependency consistency, while apt-mark showhold prints package names whose state prevents automatic changes. Keep their output with the failed install message.

An empty showhold result does not clear the problem. It only rules out an explicit hold, so continue with the package named by APT.

Inspect the installed and candidate versions

Replace package-name with the package from the error. APT can only resolve dependencies from the package versions exposed by your enabled repositories.

apt-cache policy package-name

Compare Installed and Candidate. A missing candidate points to repository configuration, while a candidate that conflicts with the required version points to mixed releases, a third-party repository, a package pin, or an incomplete upgrade. The Version table shows which source supplied each available version.

Package management on Linux explains how the package database and repositories work together. If a repository was added for one application, confirm that it supports your Ubuntu release before you repair anything.

Refresh package information and repair interrupted configuration

APT reads repository indexes before it can calculate a solution. Refresh those indexes, then ask dpkg to finish any package configuration that was left incomplete.

sudo apt update
sudo dpkg --configure -a

Do not continue past an error from dpkg –configure -a. Its output identifies the package or maintainer script that needs attention, and a dependency repair cannot repair an application-specific configuration failure by guessing. Resolve that reported configuration error before running another repair.

Preview the dependency repair before applying it

Use APT’s simulation mode before making changes. The -s option prints the packages APT would install, remove, or configure without changing the system.

sudo apt -s --fix-broken install

Read the proposed removals closely. Stop if APT plans to remove your desktop meta-package, a kernel package, or software you need, then inspect the repository and version conflict instead.

When the simulation contains only changes you accept, run the same repair without -s.

sudo apt --fix-broken install

–fix-broken lets APT select a consistent dependency set. It cannot make incompatible repositories compatible, so return to apt-cache policy when the command keeps proposing unwanted removals.

Unhold a package only when it is the conflict

A hold deliberately prevents a package from being installed, upgraded, removed, or otherwise changed by APT. That control is useful for a specific version, yet it can block a dependency chain after the rest of the system moves forward. The hold state deserves a specific reason and a specific review.

apt-mark showhold
sudo apt-mark unhold package-name
sudo apt update
sudo apt --fix-broken install

Unhold only the package named by showhold and the dependency error. Holding Ubuntu kernel packages is a separate maintenance decision, and removing that protection can install a newer kernel at the next upgrade.

Check third-party repositories and manually installed packages

The error often follows a package that expects a dependency version unavailable in your Ubuntu release. Check the repository’s published support policy, then disable or remove an unsupported source before retrying the repair.

If the conflict began after installing a downloaded package, review how Ubuntu package choices affect Firefox installs before mixing package sources. A downloaded deb package can request dependencies that differ from the versions selected by your configured repositories.

Use GNOME Software on Ubuntu when you need a graphical view of available applications, but keep APT as the source of the dependency diagnosis. The graphical application still relies on package metadata and cannot resolve a version conflict that the repositories do not satisfy. Use it to inspect available applications after the terminal diagnosis identifies the conflict.

Use Synaptic to inspect a repair in a graphical interface

Synaptic gives you a graphical package list and a Fix Broken Packages action. It is useful when you need to inspect a proposed change before applying it, especially on a desktop system.

  1. Install Synaptic from the Ubuntu repositories.
  2. Open it with administrative permissions.
  3. Select Edit, then Fix Broken Packages, and inspect the marked changes before you apply them.
sudo apt update
sudo apt install synaptic
sudo synaptic

The Edit menu item below starts Synaptic’s repair selection. Apply the changes only after the package list matches the dependency decision you made from the terminal output.

Synaptic Edit menu with Fix Broken Packages selected
Synaptic’s Edit menu exposes the Fix Broken Packages action.

Synaptic is another APT frontend, so it follows the same repository and version constraints. If it marks a surprising removal, cancel the change and inspect the source that supplied the conflicting package. The package list should explain each marked change before you continue.

Verify the repair before another install

sudo apt-get check
apt-mark showhold
sudo apt -s install package-name

apt-get check should finish without reporting broken dependencies. The final simulation gives you one more chance to inspect the requested package before an installation changes the system.

If package errors keep returning on a disposable test machine, a clean Kali Linux virtual machine can separate a damaged package state from an installer or repository issue. Keep that as a diagnostic boundary, not as a substitute for understanding the package conflict on a working system.

Does this error always mean that a package is held?

No. APT uses this message for dependency conflicts. An explicit hold is one cause, but incompatible repository versions, package pins, incomplete dpkg configuration, and a requested package that cannot be installed can produce the same error.

Is apt –fix-broken install safe to run?

Run sudo apt -s –fix-broken install first and inspect the proposed changes. Apply sudo apt –fix-broken install only when the package changes are acceptable. Stop when APT plans to remove software or kernel packages you need.

How do I find packages on hold in Ubuntu?

Run apt-mark showhold. If the package named in the dependency error appears there, remove only that hold with sudo apt-mark unhold package-name, then refresh package information and retry the dependency repair.

Keep the failed APT output until apt-get check and the installation simulation agree on a consistent package set. That output is the shortest path back to the repository, package version, or hold that caused the conflict. Keep it when you need support from a package maintainer or repository owner.