Skip to content

Instantly share code, notes, and snippets.

@jake9050
Created October 20, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jake9050/a3512f3b81237e1511f0 to your computer and use it in GitHub Desktop.
Save jake9050/a3512f3b81237e1511f0 to your computer and use it in GitHub Desktop.
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