How to fix E: Unattended upgrade returned False in APT

APTINTERMEDIATEHIGHUpdated Dec 29, 2025· 151 views

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
  1. Check the unattended-upgrades log for specific error details
  2. Fix any broken or held packages
  3. Manually update package lists and perform upgrade
  4. Check and clean up disk space if necessary
apt — error
sudo cat /var/log/unattended-upgrades/unattended-upgrades.log
E: 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

  1. Broken package dependencies preventing automatic resolution
  2. Packages held in place with apt-mark hold that conflict with updates
  3. Another apt or dpkg process running concurrently (lock file conflict)
  4. Insufficient disk space in / or /var partition for upgrade operations
  5. Corrupted dpkg database from interrupted installation
  6. Unmet dependencies in the package repository
  7. Repository connectivity issues or missing package sources

How to fix "E: Unattended upgrade returned False"

1Check the unattended-upgrades log for specific error details

View the detailed error log to understand what failed:

bash
sudo cat /var/log/unattended-upgrades/unattended-upgrades.log

Look for the last few lines that indicate the specific error. Common patterns include "Cache has broken packages" or dependency-related messages.

2Fix any broken or held packages

First, check if packages are being held:

bash
apt-mark showhold

If packages are held, unhold them:

bash
sudo apt-mark unhold <package-name>

Then fix broken dependencies:

bash
sudo apt --fix-broken install
sudo dpkg --configure -a
3Manually update package lists and perform upgrade

Run the update and upgrade process manually to test:

bash
sudo apt update
sudo apt upgrade

This allows you to see the actual error messages and confirm whether the issue is resolved. If apt prompts about changes, review and confirm.

4Check and clean up disk space if necessary

Verify available disk space, particularly in / and /var:

bash
df -h

If space is low (less than 10% available), clean up:

bash
sudo apt clean          # Remove all cached .deb files
sudo apt autoclean      # Remove old cached versions only
sudo apt autoremove     # Remove unused dependencies
5Verify the apt lock is not held by another process

Check if apt or dpkg is already running:

bash
ps aux | grep -i apt
ps aux | grep -i dpkg

If no processes are shown, safely remove stale lock files:

bash
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.

6Re-run unattended-upgrades manually to verify success

After resolving the issues above, manually trigger unattended-upgrades:

bash
sudo unattended-upgrade -d

The -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