Affected versions: Debian 13

πŸ“– ~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 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*
Illustrative mockup for debian-13 β€” terminal_or_shell
Diagnostic output for package-management/dependencies β€” Illustrative mockup β€” Progressive Robot

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
Illustrative mockup for debian-13 β€” log_or_console
Resolution output for package-management/dependencies β€” Illustrative mockup β€” Progressive Robot

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 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.