📖 ~1 min read
Table of contents
Symptom & Impact
Automatic security patches fail, increasing vulnerability exposure window.
Environment & Reproduction
Observed when package state is inconsistent or blacklist rules are incorrect.
sudo systemctl status unattended-upgrades
Root Cause Analysis
Unattended job exits on dependency issues, lock contention, or misconfigured origins.
Quick Triage
Review unattended-upgrades log and identify first failing package transaction.
sudo tail -n 120 /var/log/unattended-upgrades/unattended-upgrades.log
Step-by-Step Diagnosis
Verify apt health and origins policy for automatic updates.
sudo apt check
sudo unattended-upgrade --dry-run --debug

Solution – Primary Fix
Repair apt state and correct unattended-upgrades configuration.
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 -f install
sudo systemctl restart unattended-upgrades

Solution – Alternative Approaches
Temporarily switch to manual patch windows while investigating persistent failures.
sudo systemctl stop unattended-upgrades
Verification & Acceptance Criteria
Dry-run completes without errors and service returns to active state.
sudo unattended-upgrade --dry-run
systemctl is-active unattended-upgrades
Rollback Plan
Restore previous unattended-upgrades config backup if new policy behaves incorrectly.
sudo cp /etc/apt/apt.conf.d/50unattended-upgrades.bak /etc/apt/apt.conf.d/50unattended-upgrades
Prevention & Hardening
Monitor unattended-upgrades exit status and alert on repeated failures.
Related Errors & Cross-Refs
Connected to dpkg lock contention, held packages, and stale repository metadata.
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 unattended-upgrades operational and security update 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.