How to fix E: Unattended upgrade returned False in APT
The unattended-upgrades service encountered an error during automatic package updates. This typically indicates broken dependencies, held packages, or insufficient disk space preventing the upgrade process from completing successfully.
Quick fix
Fixes E: Unattended upgrade returned False
sudo cat /var/log/unattended-upgrades/unattended-upgrades.log- Check the unattended-upgrades log for specific error details
- Fix any broken or held packages
- Manually update package lists and perform upgrade
- Check and clean up disk space if necessary
sudo cat /var/log/unattended-upgrades/unattended-upgrades.logE: Unattended upgrade returned False
What this error means
The "Unattended upgrade returned False" error occurs when the unattended-upgrades package manager fails to complete automatic system updates on Debian/Ubuntu systems. This error is logged when the upgrade process exits with a failure status, signaling that the automatic update cycle did not succeed. The unattended-upgrades service runs in the background (usually via cron) to apply security patches and updates without user intervention. When it encounters a problem—such as broken package dependencies, conflicting package versions, held packages preventing updates, or insufficient disk space—the upgrade process terminates and returns a failure status. This is a critical issue because it means your system is not receiving automatic security updates, potentially leaving it vulnerable to known security vulnerabilities.
Typical symptoms
- System logs show "E: Unattended upgrade returned False" error
- Automatic updates have not been applied for several days
- Security patches are not being installed automatically
- /var/log/unattended-upgrades/unattended-upgrades.log shows upgrade failures
- apt or dpkg commands hang or fail when run manually
Common causes
- Broken package dependencies preventing automatic resolution
- Packages held in place with apt-mark hold that conflict with updates
- Another apt or dpkg process running concurrently (lock file conflict)
- Insufficient disk space in / or /var partition for upgrade operations
- Corrupted dpkg database from interrupted installation
- Unmet dependencies in the package repository
- Repository connectivity issues or missing package sources
How to fix "E: Unattended upgrade returned False"
View the detailed error log to understand what failed:
sudo cat /var/log/unattended-upgrades/unattended-upgrades.logLook for the last few lines that indicate the specific error. Common patterns include "Cache has broken packages" or dependency-related messages.
First, check if packages are being held:
apt-mark showholdIf packages are held, unhold them:
sudo apt-mark unhold <package-name>Then fix broken dependencies:
sudo apt --fix-broken install
sudo dpkg --configure -aRun the update and upgrade process manually to test:
sudo apt update
sudo apt upgradeThis allows you to see the actual error messages and confirm whether the issue is resolved. If apt prompts about changes, review and confirm.
Verify available disk space, particularly in / and /var:
df -hIf space is low (less than 10% available), clean up:
sudo apt clean # Remove all cached .deb files
sudo apt autoclean # Remove old cached versions only
sudo apt autoremove # Remove unused dependenciesCheck if apt or dpkg is already running:
ps aux | grep -i apt
ps aux | grep -i dpkgIf no processes are shown, safely remove stale lock files:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*Then retry apt update and upgrade.
After resolving the issues above, manually trigger unattended-upgrades:
sudo unattended-upgrade -dThe -d flag enables debug output. Check for "All packages are up to date" or other success messages. If still failing, the error details will help identify remaining issues.
Advanced notes
On systems with SELinux or AppArmor enabled, security policies may prevent unattended-upgrades from running certain operations. Check security logs with "sudo grep unattended /var/log/audit/audit.log" (SELinux) or "sudo grep unattended /var/log/syslog" (AppArmor).
For servers on metered connections, the Unattended-Upgrade configuration file (/etc/apt/apt.conf.d/50unattended-upgrades) includes options like "Skip-Updates-On-Metered-Connections" that may pause upgrades.
If running in a container, the parent image's package sources may be stale or missing. Rebuild the container from an updated base image.
Consider configuring unattended-upgrades to send email notifications when errors occur, using the "Mail" directive in /etc/apt/apt.conf.d/50unattended-upgrades to stay aware of these failures.
Frequently asked questions
- What does "E: Unattended upgrade returned False" mean?
- The "Unattended upgrade returned False" error occurs when the unattended-upgrades package manager fails to complete automatic system updates on Debian/Ubuntu systems. This error is logged when the upgrade process exits with a failure status, signaling that the automatic update cycle did not succeed. The unattended-upgrades service runs in the background (usually via cron) to apply security patches and updates without user intervention.
- How do I fix "E: Unattended upgrade returned False"?
- The unattended-upgrades service encountered an error during automatic package updates. This typically indicates broken dependencies, held packages, or insufficient disk space preventing the upgrade process from completing successfully.
- What causes "E: Unattended upgrade returned False"?
- Broken package dependencies preventing automatic resolution Packages held in place with apt-mark hold that conflict with updates Another apt or dpkg process running concurrently (lock file conflict)
- Is the "E: Unattended upgrade returned False" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.
Official resources & further reading
- 📚APT Official Documentation
- 📖Debian Wiki: Automatic Updates with unattended-upgrades(Official Docs)
- 🐙
- 📖Debian man page: unattended-upgrade(Official Docs)
- 💬Debian Forum: Troubleshooting unattended-upgrades(Stack Overflow)