Dev.to
7/7/2026

Ubuntu APT Troubleshooting: Fix Broken Packages, Holds, and GPG Errors
Short summary
Ubuntu APT failures are state-conflict problems where APT's view of repositories, available versions, and installed packages no longer agrees—not mysterious, but systematic. Start troubleshooting with apt update, then run diagnostics (dpkg --configure -a, apt list --upgradable, apt-mark showhold) to classify the failure as repository, dependency, held-package, or interrupted-install. Apply class-specific fixes and use modern repository patterns like signed-by with separate keyrings instead of deprecated apt-key.
- •APT failures stem from state conflicts between repository metadata, available versions, and installed packages
- •Troubleshooting sequence: apt update → diagnostics → classify failure type → apply class-specific fix
- •Use modern GPG keyring patterns with signed-by; avoid deprecated apt-key for new repository setup
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



