Type the following command exactly as shown and press Enter:
sudo dpkg --configure -a
Breaking down the command:
To understand this error, you must first understand the Debian Package Manager (dpkg). Think of dpkg as the low-level engine that installs, removes, and unpacks .deb packages. apt (Advanced Package Tool) is the user-friendly front-end that calls dpkg in the background to handle dependencies. Type the following command exactly as shown and
The "dpkg was interrupted" error looks scary, but it is the Linux package manager’s way of asking for a little help to finish the job.
The Quick Fix Cheat Sheet:
If you are still facing issues after trying all these steps, it might be time to check the specific package logs in /var/log/apt/term.log to see exactly where the process is failing. But for 95% of users, Step 1 is all you need!
sudo rm /var/cache/apt/archives/<package>_*.deb
sudo apt update
sudo apt install --reinstall <package>
The error "dpkg was interrupted" is Linux's way of pausing the assembly line because a part Breaking down the command: To understand this error,
The "E: dpkg was interrupted" error occurs on Debian-based systems when package installation or updates are terminated prematurely, leaving packages unconfigured. The standard solution is to run sudo dpkg --configure -a in the terminal to complete pending setups. For more details, visit Ask Ubuntu. E: dpkg was interrupted... run 'sudo dpkg --configure