Remove the lock files:
dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
Try forcing the install of any pending packages:
Follow these solutions in order. Start with Step 1, which resolves the vast majority of cases. Step 1: Run the Suggested Command Remove the lock files: dpkg was interrupted, you
The error message can be alarming, but in most cases it’s harmless and easy to fix. Simply open a terminal and execute:
sudo apt remove --purge package-name sudo apt install package-name
First, find the problematic package:
sudo dpkg --remove --force-remove-reinstreq <package-name> sudo apt install -f
dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
If another process is holding the package manager hostage, or if a previous crash left behind "lock" files, dpkg will refuse to run. Clean them out manually: Step 1: Run the Suggested Command The error
Sometimes, a specific package's post-installation script ( postinst ) is crashing. Dpkg will try to run it and fail repeatedly. To fix this, you need to forcibly reinstall or remove the offending package.
If you are still seeing the error after trying all the steps above, a specific package's installation script is fundamentally broken. You will need to wipe that specific package out of the internal status tracking database. Open the status file in a text editor: sudo nano /var/lib/dpkg/status Use code with caution.
If you see processes like apt-get , dpkg , synaptic , or update-manager , note their PIDs and kill them if they are hung: Clean them out manually: Sometimes, a specific package's
sudo dpkg -i --force-overwrite /var/cache/apt/archives/package-name.deb