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
sudo apt-get install -f: This command will attempt to install any missing dependencies and resolve conflicts.sudo apt-get update: This command will update your package index and may help resolve package conflicts.sudo apt-get dist-upgrade: This command will perform a full system upgrade, which may help resolve package conflicts and ensure your system is up-to-date.If you’re a Linux user—specifically on Debian-based systems like Ubuntu, Linux Mint, or Kali—you’ve likely encountered the dreaded "dpkg was interrupted" error. This usually happens when a system update or software installation is cut short by a power failure, a lost internet connection, or a forced restart.
sudo dpkg --configure -a
sudo apt-get update
While the fix is simple, prevention is better than the cure. Here are a few tips to avoid seeing this error again:
This forces the system to download fresh copies of the software next time you run an install command. Pro-Tip: Avoid the "Interruption" in the Future To prevent this error from happening again: Never close the terminal while an installation is running. Don't pull the plug or reboot during a system upgrade.
Once the locks are gone, refresh your local database of available software: sudo apt update Use code with caution. 3. Fix Broken Dependencies
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
sudo apt-get install -f: This command will attempt to install any missing dependencies and resolve conflicts.sudo apt-get update: This command will update your package index and may help resolve package conflicts.sudo apt-get dist-upgrade: This command will perform a full system upgrade, which may help resolve package conflicts and ensure your system is up-to-date.If you’re a Linux user—specifically on Debian-based systems like Ubuntu, Linux Mint, or Kali—you’ve likely encountered the dreaded "dpkg was interrupted" error. This usually happens when a system update or software installation is cut short by a power failure, a lost internet connection, or a forced restart. The "dpkg was interrupted" error on Linux occurs
sudo dpkg --configure -a
sudo apt-get update
While the fix is simple, prevention is better than the cure. Here are a few tips to avoid seeing this error again: Run sudo apt-get install -f : This command
This forces the system to download fresh copies of the software next time you run an install command. Pro-Tip: Avoid the "Interruption" in the Future To prevent this error from happening again: Never close the terminal while an installation is running. Don't pull the plug or reboot during a system upgrade. Force reinstallation of dpkg/apt:
Once the locks are gone, refresh your local database of available software: sudo apt update Use code with caution. 3. Fix Broken Dependencies