Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Try to fix broken apt
Sometimes a package f*cks up during installation and you get a broken state, potentially messing with the ability to install other software ...
Example of bad install
dpkg: error processing package PACKAGE (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
PACKAGE
E: Sub-process /usr/bin/PACKAGE returned an error code (1)
Solution:
Manualy uninstall and remove the dpkg state files:
mv /var/lib/dpkg/info/PACKAGE.* /tmp/
dpkg --remove --force-remove-reinstreq PACKAGE
dpkg --purge PACKAGE
Now you can try apt-get installing it again :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment