Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active July 18, 2018 13:32
Show Gist options
  • Save plembo/ad56fbff6ce6047f53ccd18d47c168ed to your computer and use it in GitHub Desktop.
Save plembo/ad56fbff6ce6047f53ccd18d47c168ed to your computer and use it in GitHub Desktop.
dpkg: XYZ is broken or not fully installed

Got into a fight with Ubuntu's "Software Updater" yesterday.

After doing a "sudo apt update && sudo apt upgrade" got a string of error messages regarding a metric ton of system packages like this:

gconf2 is broken or not fully installed

This appeared to be the result of apt losing its mind. On Red Hat derived systems the solution would be to rebuild the yum (or dnf) database and clear all caches.

After trying all the other solutions offered in this post without success, I finally followed the procedure described in response 11:

If all else fails. What I did was I first changed the directory to:

cd /var/lib/dpkg/info

then I removed everything with .postinst:

sudo rm *.postinst

then update repository

sudo apt-get update

then everything went back to normal when I did:

sudo apt-get --force-yes install openjdk-7-jre-headless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment