How to fix dpkg: too many errors, stopping in APT

APTINTERMEDIATEHIGHUpdated Apr 11, 2026· 316 views

The dpkg package manager is reporting too many errors during installation or upgrades and has halted processing. This typically indicates a corrupted package database or interrupted installation that needs database reconfiguration.

Quick fix

Fixes dpkg: too many errors, stopping

sudo dpkg --configure -a
  1. Reconfigure the dpkg database
  2. Fix broken dependencies
  3. Remove lock files
  4. Remove cached problematic packages
apt — error
sudo dpkg --configure -a
dpkg: too many errors, stopping

What this error means

This error occurs when the dpkg package manager encounters multiple failures during package installation, configuration, or upgrade operations and reaches its error threshold. When dpkg detects too many individual errors, it stops processing to prevent further damage and data corruption. This is a protective mechanism that indicates either a serious problem with the package database, an interrupted installation process, or system resource constraints that prevented normal package operations from completing.

Typical symptoms

  • apt-get or dpkg commands fail with the "too many errors, stopping" message
  • Unable to install, upgrade, or remove packages
  • Package installation or upgrade processes interrupt unexpectedly
  • System cannot find or access required package configuration files

Common causes

  1. Interrupted package installation or upgrade (e.g., manual Ctrl+C, power outage, or system crash during dpkg operations)
  2. Corrupted dpkg package database due to disk errors or filesystem issues
  3. Broken dependencies from failed or incomplete package downloads
  4. Locked package manager files preventing normal dpkg operations
  5. Insufficient disk space or system resources during package operations

How to fix "dpkg: too many errors, stopping"

1Reconfigure the dpkg database

Run the dpkg configuration command to repair the package database. This is the most straightforward solution and should be tried first.

bash
sudo dpkg --configure -a

The -a flag tells dpkg to configure all packages that are currently unpacked but not yet configured. This command repairs the database and resolves most corruption issues.

2Fix broken dependencies

If the above command doesn't fully resolve the issue, use apt to fix broken dependencies from interrupted installations.

bash
sudo apt install -f

Alternatively, use the longer form:

bash
sudo apt install --fix-broken

This command will complete any partially installed packages and resolve dependency issues.

3Remove lock files

If the previous steps don't work, lock files may be preventing package operations. Remove them and update the package cache.

bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
cd /var/lib/dpkg/updates
sudo rm *
sudo apt update

These commands clear lock files that may have been left behind from interrupted operations.

4Remove cached problematic packages

Downloaded packages are cached in /var/cache/apt/archives/. If a cached package is corrupted, remove it.

First, identify packages that might be problematic:

bash
ls -la /var/cache/apt/archives/

Then remove the problematic package (replace package_name with the actual package):

bash
sudo rm /var/cache/apt/archives/package_name.deb
sudo apt update
5Remove package info files (last resort)

If none of the above methods work, you can manually remove problematic package information files. The /var/lib/dpkg/info directory contains metadata for installed packages.

First, identify files related to a problematic package:

bash
sudo ls -l /var/lib/dpkg/info | grep -i package_name

Then move them to a temporary location (don't delete them immediately, in case you need to restore):

bash
sudo mv /var/lib/dpkg/info/package_name.* /tmp/
sudo apt update

After this, you may need to reinstall the problematic package.

Advanced notes

Recovery Priority: Always try fixes in order (dpkg --configure -a first) before moving to destructive operations like removing package files. The later steps should only be used when earlier attempts fail.

Prevention: To avoid this error in the future:
- Never interrupt package operations with Ctrl+C unless absolutely necessary
- Ensure stable power supply during long system updates
- Keep at least 1-2 GB of free disk space before major updates
- Close other applications to avoid resource contention during package operations

Rootless Systems: These fixes work on both regular and rootless package management systems, though the dpkg database location may vary on some systems.

Frequently asked questions

What does "dpkg: too many errors, stopping" mean?
This error occurs when the dpkg package manager encounters multiple failures during package installation, configuration, or upgrade operations and reaches its error threshold. When dpkg detects too many individual errors, it stops processing to prevent further damage and data corruption. This is a protective mechanism that indicates either a serious problem with the package database, an interrupted installation process, or system resource constraints that prevented normal package operations from completing.
How do I fix "dpkg: too many errors, stopping"?
The dpkg package manager is reporting too many errors during installation or upgrades and has halted processing. This typically indicates a corrupted package database or interrupted installation that needs database reconfiguration.
What causes "dpkg: too many errors, stopping"?
Interrupted package installation or upgrade (e.g., manual Ctrl+C, power outage, or system crash during dpkg operations) Corrupted dpkg package database due to disk errors or filesystem issues Broken dependencies from failed or incomplete package downloads
Is the "dpkg: too many errors, stopping" 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