When i have to install something then this appears:

dpkg: error processing package libgtk2-gladexml-perl (--purge):

 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
Errors were encountered while processing:


E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Why did you remove sources.list? Sounds counterproductive. – mikewhatever Jul 1 '16 at 10:00
  • How are you trying to install it? – Juanjo Salvador Jul 1 '16 at 10:27

Reinstall the package from the .deb-file directly:

sudo dpkg -i /var/cache/apt/archives/libgtk2-gladexml-perl_version.deb

Use tab completion, because the .deb-file is additionally named with a version number!

Now, update your system:

sudo apt-get update
sudo apt-get upgrade

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.