5

I tried to install a package with sudo apt-get install [package], but most of the way through it froze (due to an incompatibility between the package and my system). I had to hard reboot my system. Now, whenever I try apt-get install, clean, remove, purge, etc, I get the error

E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

The issue is that the configuration is what broke, so dpkg --configure -a freezes halfway through and forces me to reboot. Now, I'm stuck in a state I can't seem to get out of. Attempting dpkg --configure -a freezes, but any other package-related commands tell me I need to run dpkg --configure -a. How can I abort the installation/configuration of this package?

While I'm looking for generic answers, here's the specific issue that causes configure to fail. In case it matters, dpkg --version gives 1.17.27 (armhf).

1
  • I'm not sure which OS you're running and if journalD is available. But try to open two shells. In the first run sudo journalctl -f this is the system's log. In the second shell run dpkg --configure -a - just post the log for further investigation. – Michael D. Oct 19 '17 at 20:59
10

Try first by manually cleaning the package:

sudo mv /var/lib/dpkg/info/PACKAGE.* /tmp/ 
sudo dpkg --remove --force-remove-reinstreq PACKAGE
1
  • This worked for removing restoring dpkg! – CodeMonkey Mar 12 '20 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.