Errors while processing: /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb

This error is getting quite famous and incase you encounter it, then here is the solution to it :-

sudo apt-get upgrade

and you get this,

and if you try this in case you’re feeling lucky

sudo dpkg --purge --force-all apport
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 534968 files and directories currently installed.)
Removing apport (2.20.1-0ubuntu2.5) ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: error processing package apport (--purge):
 subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:

Tired of solving this error, just run this :-


sudo dpkg --purge path/package.deb
sudo apt-get -f install
sudo apt-get update && sudo apt-get upgrade

That’s it, it should get resolved by now.