Dpkg Was Interrupted You Must Manually Run Sudo | Dpkg Configure To Correct The Problem
Sometimes, running the command above doesn't magically fix everything. Here are advanced steps to resolve stubborn locks or database issues.
The error states that dpkg was "interrupted." This means that during a previous operation (installing, upgrading, or removing a package), the process was forcibly stopped before it could finish. Common causes include:
When dpkg runs, it locks its database (/var/lib/dpkg/lock) to prevent corruption. If the process is interrupted, the lock remains, and dpkg doesn't know if the last operation succeeded or failed. The system then refuses to run any new installations until you manually fix the unfinished business. Sometimes, running the command above doesn't magically fix
sudo dpkg --configure -a
sudo apt-get install -f
The "dpkg was interrupted" error on Linux occurs when package installation is halted, often requiring the command sudo dpkg --configure -a to fix broken installations and reconfigure pending packages. Additional steps, such as sudo apt install -f or removing lock files, may be needed to fully resolve package database locks. Read the full guide on Ask Ubuntu at Ask Ubuntu. E: dpkg was interrupted... run 'sudo dpkg --configure
If you are a user of Debian, Ubuntu, Linux Mint, or any Debian-based Linux distribution, you may have encountered a frustrating roadblock while trying to install or remove software using the apt or apt-get commands. Suddenly, your terminal is frozen with the following error: When dpkg runs, it locks its database (
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Do not panic. This error is common, usually harmless, and fixable with a few terminal commands. This article will explain why this happens, how to fix it permanently, and what to do if the simple solution doesn't work. sudo dpkg --configure -a sudo apt-get install -f
Type the following command exactly as shown and press Enter:
sudo dpkg --configure -a
Breaking down the command: