π ~1 min read
Table of contents
Symptom & Impact
Full upgrade stops with unmet dependencies and held package warnings.
Environment & Reproduction
Common on hosts with pinned versions or mixed repositories.
sudo apt-mark showhold
sudo apt-get -s dist-upgrade
Root Cause Analysis
Package holds and conflicting repository candidates prevent apt resolver convergence.
Quick Triage
Check for held packages, broken states, and conflicting sources.
sudo dpkg --audit
sudo apt-get check
sudo grep -R '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d 2>/dev/null
Step-by-Step Diagnosis
Simulate the upgrade and inspect the resolver output.
sudo apt-get update
sudo apt-get -o Debug::pkgProblemResolver=yes -s dist-upgrade

Solution – Primary Fix
Release package holds, repair broken packages, and run the upgrade in order.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo apt-mark unhold $(apt-mark showhold) || true
sudo apt-get -f install -y
sudo dpkg --configure -a
sudo apt-get dist-upgrade -y

Solution – Alternative Approaches
Temporarily disable third-party repositories and test with official Ubuntu archives only.
sudo sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/*.list 2>/dev/null || true
sudo apt-get update
Verification & Acceptance Criteria
No held or broken packages remain and simulation completes cleanly.
sudo apt-mark showhold
sudo dpkg --audit
sudo apt-get -s dist-upgrade
Rollback Plan
Restore previous source files and package pins if critical app dependencies regress.
# restore backups in /etc/apt/sources.list.d
Prevention & Hardening
Maintain repository governance and review holds before maintenance windows.
sudo apt-cache policy | sed -n '1,200p'
Related Errors & Cross-Refs
Related errors include package has no installation candidate and kept back packages.
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 apt resolver and package pinning references.
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.