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

Release-upgrade checks fail due to held packages and unresolved dependencies.

Environment & Reproduction

Common after manual pinning or partial upgrades.

lsb_release -a
sudo apt-mark showhold
sudo apt update
sudo do-release-upgrade -c

Root Cause Analysis

Held packages block dependency resolution required by release tooling.

Quick Triage

Enumerate holds, pins, and broken state.

sudo apt-mark showhold
grep -RIn 'Pin:' /etc/apt/preferences /etc/apt/preferences.d 2>/dev/null
sudo apt -f install -y

Step-by-Step Diagnosis

Use resolver debug output to identify blockers.

sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade -s
sudo dpkg --audit
sudo tail -n 120 /var/log/dist-upgrade/main.log 2>/dev/null || true
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_shell
Listing package holds before upgrade β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Remove nonessential holds and normalize package state.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

for p in $(apt-mark showhold); do sudo apt-mark unhold $p; done
sudo dpkg --configure -a
sudo apt -f install -y
sudo apt full-upgrade -y
sudo do-release-upgrade -c
Illustrative mockup for ubuntu-24-04-lts β€” log_or_config
Clearing holds and repairing dependencies β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Temporarily disable third-party repositories that conflict.

sudo mkdir -p /var/tmp/apt-sources-backup
sudo cp -a /etc/apt/sources.list.d /var/tmp/apt-sources-backup/
sudo sed -i 's/^deb/#deb/g' /etc/apt/sources.list.d/*.list
sudo apt update

Verification & Acceptance Criteria

No holds remain and upgrade check succeeds.

sudo apt-mark showhold
sudo apt-get check
sudo do-release-upgrade -c

Rollback Plan

Reapply required holds after compatibility testing.

sudo apt-mark hold 
sudo cp -a /var/tmp/apt-sources-backup/sources.list.d/* /etc/apt/sources.list.d/
sudo apt update

Prevention & Hardening

Track holds centrally and review before maintenance windows.

apt-mark showhold > /var/tmp/held-packages.txt
apt-cache policy | head -n 120

Related to obsolete PPAs, broken packages, and stale pin files.

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 release-upgrade and apt pinning documentation.

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.