π ~1 min read
Table of contents
Symptom & Impact
apt exits with unmet dependencies, preventing package install and update operations.
Environment & Reproduction
Typically follows forced shutdown or network interruption during apt upgrade.
sudo apt upgrade -y
sudo apt install -y nginx
sudo dpkg --audit
Root Cause Analysis
Partially configured packages and missing package versions break dependency graph resolution.
Quick Triage
Check package state and identify failed transactions.
sudo dpkg --audit
sudo apt -f install
sudo apt-cache policy
Step-by-Step Diagnosis
Inspect problematic packages and transaction logs for first failure point.
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/'

Solution – Primary Fix
Complete pending configurations, repair dependencies, and retry upgrade.
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

Solution – Alternative Approaches
Pin or remove conflicting packages, then reinstall required components.
sudo apt remove -y
sudo apt install -y
Verification & Acceptance Criteria
No broken packages are reported and updates complete cleanly.
sudo dpkg --audit
sudo apt check
sudo apt upgrade -y
Rollback Plan
Revert to known package versions if application compatibility breaks.
sudo apt-cache policy
sudo apt install -y =
Prevention & Hardening
Use reliable mirrors and avoid terminating apt jobs during upgrade windows.
grep -v '^#' /etc/apt/sources.list
sudo systemctl status apt-daily.timer
Related Errors & Cross-Refs
Related to held packages, stale apt caches, and third-party repository conflicts.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu apt and dpkg recovery guidance for broken dependency states.
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.