Affected versions: Ubuntu 24.04 LTS

πŸ“– ~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 reports unmet dependencies and leaves the system partially updated.

Environment & Reproduction

Seen after mixed repositories, partial upgrades, or pinned package versions.

cat /etc/os-release
apt-mark showhold
sudo apt update

Root Cause Analysis

The package solver cannot build a consistent set due to holds, pinning, or repo skew.

Quick Triage

Collect held packages and detect broken states first.

apt-mark showhold
sudo apt --fix-broken install -y
sudo dpkg --audit

Step-by-Step Diagnosis

Run dry-runs and inspect apt preferences for conflicting constraints.

sudo apt upgrade --dry-run
sudo apt full-upgrade --dry-run
grep -R 'Pin:' /etc/apt/preferences*
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_shell
Diagnostic output for package-management/dependencies β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Repair dpkg state, clear holds when appropriate, then complete 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 ubuntu-24-04-lts β€” log_or_console
Resolution output for package-management/dependencies β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Temporarily disable third-party sources 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

Accept when no held or broken packages remain.

sudo apt full-upgrade -y
apt-mark showhold
sudo dpkg --audit

Rollback Plan

Reinstall known-good package versions and hold critical packages if needed.

apt-cache madison PACKAGE
sudo apt install PACKAGE=VERSION -y
sudo apt-mark hold PACKAGE

Prevention & Hardening

Keep sources minimal and avoid mixing unsupported repositories.

sudo pro status
sudo apt update && sudo apt upgrade -y

Related errors include held broken packages and requested an impossible situation.

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 packaging documentation and apt preferences guidance.

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.