π ~1 min read
Table of contents
Symptom & Impact
apt upgrade fails with unmet dependencies and leaves packages unconfigured.
Environment & Reproduction
Often seen after mixed repositories, holds, or interrupted upgrades.
cat /etc/os-release
apt-mark showhold
sudo apt update
Root Cause Analysis
Package solver cannot resolve a consistent set due to version constraints.
Quick Triage
Identify held packages and broken state before forcing installs.
apt-mark showhold
sudo apt --fix-broken install -y
sudo dpkg --audit
Step-by-Step Diagnosis
Use dry-runs and review pinning rules to find conflicting constraints.
sudo apt upgrade --dry-run
sudo apt full-upgrade --dry-run
grep -R 'Pin:' /etc/apt/preferences*

Solution – Primary Fix
Repair dpkg state, clear invalid holds, then run full-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-mark unhold $(apt-mark showhold)
sudo apt update
sudo apt full-upgrade -y

Solution – Alternative Approaches
Disable third-party sources temporarily and retry dependency resolution.
sudo sed -i 's/^deb/# deb/g' /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt install PACKAGE -y
Verification & Acceptance Criteria
No held packages and no broken dependency output remain.
sudo apt full-upgrade -y
apt-mark showhold
sudo dpkg --audit
Rollback Plan
Pin or reinstall known-good versions for critical services.
apt-cache policy PACKAGE
sudo apt install PACKAGE=VERSION -y
sudo apt-mark hold PACKAGE
Prevention & Hardening
Keep repositories minimal and avoid unsupported suite mixing.
grep -R '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d
sudo apt update && sudo apt upgrade -y
Related Errors & Cross-Refs
Related errors include held broken packages and impossible dependency situations.
Related tutorial: View the step-by-step tutorial for Debian 13.
View all Debian 13 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Debian APT pinning and package dependency 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.