📖 ~1 min read
Table of contents
Symptom & Impact
Package installation fails and patching pipelines stop due to unresolved dependencies.
Environment & Reproduction
Often seen after interrupted upgrades or unsupported repository mixes.
sudo apt install nginx
Root Cause Analysis
Package database contains incomplete or conflicting dependency state.
Quick Triage
Check held packages and audit dpkg status.
apt-mark showhold
sudo dpkg --audit
Step-by-Step Diagnosis
Inspect candidate versions and solver debug output.
apt-cache policy nginx
sudo apt -o Debug::pkgProblemResolver=yes install nginx

Solution – Primary Fix
Repair package state and retry installation with resolved dependencies.
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 -f install
sudo apt install nginx

Solution – Alternative Approaches
Remove obsolete conflicting package versions, then reinstall target package.
sudo apt remove nginx-common
Verification & Acceptance Criteria
No unmet dependency warnings remain and target package is installed.
sudo apt check
dpkg -l | grep '^ii' | grep nginx
Rollback Plan
Remove the newly installed package if application compatibility regresses.
sudo apt remove nginx
Prevention & Hardening
Use official Ubuntu repositories and avoid partial upgrades on production hosts.
Related Errors & Cross-Refs
Commonly linked to held packages and stale third-party sources.
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 documentation and apt resolver behavior notes.
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.