This error message typically appears when a package installation or system update was forcibly stopped before it could finish
. Common causes include accidental reboots during background "unattended upgrades," losing power, or manually killing a process like while it was still active. linux.brostrend.com How to Fix the Interrupted dpkg
The error itself contains the solution. To fix the issue, open your terminal and run the following command exactly: sudo dpkg --configure -a Use code with caution. Copied to clipboard What this command does:
: Runs the command with administrative (root) privileges, which is required for managing system packages.
: The underlying package manager for Debian-based systems like Ubuntu, Linux Mint, and Raspberry Pi OS. --configure : Instructs
to finish setting up any packages that were unpacked but not yet fully configured. : Short for "all." It tells the system to process pending packages rather than just one specific package. Troubleshooting Further Issues
If the command above does not resolve the problem, you may need to try these follow-up steps:
Once upon a time in the land of Linux, a user named decided it was finally time to update his system. He opened the terminal, typed his commands with confidence, and watched as the text scrolled by like digital rain. This error message typically appears when a package
But then, disaster struck—not a virus or a hacker, but a simple, mundane accident. Leo’s cat, Midnight, leapt onto the desk, chasing a phantom fly, and landed directly on the power strip. The screen went black. The hum of the fans died. The silence was deafening.
When Leo rebooted, he tried to install a small game to calm his nerves. Instead of progress, he was met with a stern, unyielding wall of text:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem The Broken Bridge
Leo felt like a builder who had walked away from a bridge halfway through laying the stones. The system's package manager,
, was stuck in a "half-configured" state. It couldn't start anything new because it hadn't finished the old job. Every time he tried to use
, the system pointed back at that unfinished bridge, refusing to let any more "traffic" through until the structural integrity was restored. The Command of Restoration
Leo sighed, took a sip of cold coffee, and did exactly what the terminal asked. He typed: sudo dpkg --configure -a Prevention
The terminal didn't argue. It didn't ask for a reason. With the
flag (standing for "all"), it methodically went through every package that had been left in limbo during the power outage. Unpacking: It checked the files that were half-delivered. Configuring:
It ran the scripts that were supposed to set up the software's settings.
It removed the "lock" files that had been preventing other installations. E: dpkg was interrupted... run 'sudo dpkg --configure
"dpkg was interrupted, you must manually run sudo dpkg --configure -a"
occurs when a package installation or system update is forcibly stopped before completion
. This often happens due to a sudden power failure, an unexpected reboot, or manually closing the terminal during an active process. Ask Ubuntu Primary Solution Always let apt or dpkg finish completely
To fix this, run the command exactly as suggested in the error message to resume the configuration of pending packages: Open your terminal (typically Ctrl + Alt + T Type or paste the following command and press sudo dpkg --configure -a Enter your password when prompted. Ask Ubuntu Troubleshooting Further Issues
If the primary command fails or hangs, you can try these additional steps to clear the package manager: Fix Broken Dependencies : If there are unmet requirements, use the Debian/Ubuntu fix-broken command sudo apt-get install -f Clear Lock Files
: If you see an error like "Could not get lock," another process might be using the package manager. Close other installers (like Synaptic or Update Manager) or manually remove the locks as suggested on BigBearTechWorld sudo rm /var/lib/dpkg/lock Remove Pending Updates
: As a last resort, if the configuration continues to hang, some users on Ask Ubuntu recommend clearing the update folder: sudo rm /var/lib/dpkg/updates/* Ask Ubuntu Once the issue is resolved, it is recommended to run sudo apt update sudo apt upgrade to ensure your system is fully synchronized and stable. Did you encounter a specific error message system hang when you tried running the suggested dpkg --configure -a E: dpkg was interrupted... run 'sudo dpkg --configure 13 Jul 2012 —
apt or dpkg finish completely.Ctrl+C during package configuration./var/lib/dpkg/status for serious recovery cases.In most cases, a simple sudo dpkg --configure -a resolves everything and takes only a few seconds to run.
Here’s a blog post tailored for someone who encountered the dpkg error and needs a clear, helpful fix.
The file /var/lib/dpkg/status holds the state of every package on your system. If it's corrupted, you can rename the old one and create a new one from the backups:
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.broken
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo dpkg --configure -a
sudo apt-get update
It helps to understand the tools you are using so you feel more confident fixing the issue.
sudo: Gives you administrative (root) privileges. You need this to modify system software.dpkg: This is the backend package manager for Debian-based systems. apt is essentially a user-friendly frontend for dpkg.--configure: This flag tells dpkg to take a package that has been unpacked (files moved to the disk) but not yet set up, and finish configuring it. This sets up configuration files, starts services, and registers the package fully.-a: This stands for "all." It tells the system to apply the configuration action to all packages that currently need it.So, in plain English: "Hey system, please take administrative control, look at all the software that is currently stuck halfway through installation, and finish setting them up."
sudo dpkg --configure -a
sudo dpkg --configure <package-name>
sudo cat /var/lib/dpkg/info/<package-name>.postinst
sudo /var/lib/dpkg/info/<package-name>.postinst configure
sudo apt --fix-broken install
sudo apt install -f
sudo dpkg --remove --force-remove-reinstreq <package-name>
sudo apt install -f