Dpkg Was Interrupted You Must Manually Run Sudo Dpkg Configure To Correct The Problem [work]
No. It only completes pending package configuration. Your personal files are untouched. However, if a package script contains a bug, it might delete configuration files – but that's extremely rare and not a normal behavior.
-a : Applies the action to pending, unconfigured packages.
Do not open the Ubuntu Software Center or Synaptic Package Manager while running apt commands in the terminal.
sudo apt update sudo apt upgrade
Remove the lock files:
Find the name of the package causing the loop from your terminal output (for example: badpackage ). Move its info files out of the way: sudo mv /var/lib/dpkg/info/badpackage.* /tmp/ Use code with caution. 2. Force Clear the Package Force dpkg to forget the package configuration entirely: sudo dpkg --remove --force-remove-reinstreq badpackage Use code with caution. 3. Reconfigure and Reinstall
or manually reconfigure just that package: However, if a package script contains a bug,
sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock Use code with caution. Step B: Force the Reconfiguration
Once the locks are removed, run the configuration command again:
sudo dpkg --configure -a
How to Fix "dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem"
How to Fix the "dpkg was interrupted" Error in Linux The error message is a common issue in Debian-based Linux distributions like Ubuntu, Linux Mint, and Pop!_OS. It occurs when the Debian Package Manager (dpkg) is suddenly stopped during an installation, update, or upgrade process.
Power outages during package configuration are a common cause. When the system restarts, dpkg is left in a confused state. The fix: just run sudo dpkg --configure -a as soon as you can log back in. sudo apt update sudo apt upgrade Remove the
Example: you ran sudo apt install firefox and then in another terminal sudo apt remove vlc . The second command will be blocked by the first, and if you kill it, you may end up with an interrupted state. Always wait for one package operation to finish before starting another.