Affected versions: Ubuntu 24.04 LTS

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

apt exits with unmet dependency errors and package installs fail.

Environment & Reproduction

Common after sudden reboot or network failure during upgrade.

sudo apt upgrade -y
sudo apt install -y nginx
sudo dpkg --audit

Root Cause Analysis

Partially configured packages leave dependency chains unresolved.

Quick Triage

Audit package status and attempt safe dependency repair.

sudo dpkg --audit
sudo apt -f install
sudo apt-cache policy

Step-by-Step Diagnosis

Inspect apt logs and identify first failing package.

grep -iE 'error|broken|unmet' /var/log/apt/term.log | tail -n 50
sudo apt-mark showhold
sudo dpkg -l | awk '$1 ~ /..r|..U|..F/'
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_shell
Dependency issue triage in shell β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Complete pending configurations and run full dependency repair.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo dpkg --configure -a
sudo apt --fix-broken install -y
sudo apt update
sudo apt full-upgrade -y
Illustrative mockup for ubuntu-24-04-lts β€” logs_or_journal
APT and dpkg error logs β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Remove conflicting package versions and reinstall required dependencies.

sudo apt remove -y 
sudo apt install -y 

Verification & Acceptance Criteria

No broken packages remain and upgrades complete cleanly.

sudo dpkg --audit
sudo apt check
sudo apt upgrade -y

Rollback Plan

Pin known-good package versions if regression appears.

sudo apt-cache policy 
sudo apt install -y =

Prevention & Hardening

Use reliable mirrors and avoid interrupting apt transactions.

grep -v '^#' /etc/apt/sources.list
sudo systemctl status apt-daily.timer

Related to held packages and third-party repository conflicts.

Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.

View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Ubuntu package management troubleshooting docs.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.