Dpkg Was Interrupted, You Must Manually Run 'dpkg --configure -a' To Correct The Problem May 2026
sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a If dpkg --configure -a keeps failing on the same package (e.g., grub-pc or linux-image ), try purging its configuration and reinstalling:
Have you ever tried to install something on Ubuntu or Debian using apt install , only to be greeted by this wall of red text? Let me know in the comments—I've probably seen it
If nothing else is open, force-remove the stale lock file (only if you're sure no package manager is running): Every time you install, remove, or update software,
sudo dpkg --configure -a sudo apt install -f Run those two commands, and you'll be back to installing software in under a minute. Have a different package manager error? Let me know in the comments—I've probably seen it. Your system isn't broken
Here’s why it happens and exactly how to fix it. dpkg is the low-level package manager behind apt , apt-get , and the Software Center. Every time you install, remove, or update software, dpkg locks its database to prevent corruption.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. Don’t panic. Your system isn't broken, and you don't need to reinstall Linux. This error is simply Linux’s way of saying, "Hey, the last installation didn't finish cleanly. Please let me tidy up before we continue."
sudo dpkg --configure -a It tells dpkg to go back and finish configuring any partially installed packages.



