Error Codes Wiki

apt Unmet Dependencies — Broken Packages and Dependency Resolution Failures

Errorpackage

Overview

Fix apt 'unmet dependencies' and 'broken packages' errors on Debian and Ubuntu when package installations fail due to conflicting or missing dependencies.

Key Details

  • apt resolves package dependencies automatically but can fail when versions conflict
  • Broken packages occur when a partially installed package has unsatisfied dependencies
  • Mixing repositories (Ubuntu main with PPAs, different release versions) is the most common cause
  • dpkg --configure -a finishes configuring partially installed packages
  • apt --fix-broken install attempts to resolve broken dependencies automatically

Common Causes

  • Interrupted installation (power loss, Ctrl+C) leaving packages in a half-installed state
  • PPA repository providing packages that conflict with official Ubuntu repository versions
  • Manual dpkg -i of a .deb package without its dependencies being available
  • Mixing package sources from different Ubuntu releases (e.g., Jammy packages on Focal)

Steps

  1. 1Try automatic fix: 'sudo apt --fix-broken install' to resolve dependency issues
  2. 2Configure pending packages: 'sudo dpkg --configure -a' to finish interrupted installations
  3. 3Force fix with specific version: 'sudo apt install package=version' to install a compatible version
  4. 4Remove the conflicting package: 'sudo apt remove conflicting-package' then retry installation
  5. 5Last resort: 'sudo apt clean && sudo apt update && sudo apt --fix-broken install'

Tags

aptdependenciesbrokendpkgubuntu

Related Items

More in Package

Frequently Asked Questions

Generally yes. It attempts to install missing dependencies or remove the broken package. It shows what it plans to do before executing. Review the proposed changes before confirming, especially if it wants to remove packages.