Manually remove a broken package on Debian/Ubuntu

Manually remove a broken package on Debian/Ubuntu

Sometimes, a Debian or Ubuntu package is not installed correctly or can’t be uninstalled. The system update is so completely broken that conventional commands, whether apt-get, ability ordpkg, not corrects the problem.

For example the  package varnish, I faced this issue in Ubuntu 14.04. When I try to remove this package with

 

sudo apt-get remove varnish

 

the package manager asks to reinstall it properly :

 

screenshot-postimg.org 2015-09-04 16-50-15

 

So, How to uninstall this package? The solution: manually uninstall the package.

 

mv /var/lib/dpkg/info/varnish.* /tmp/
dpkg --remove --force-remove-reinstreq varnish

NEWSLETTERS

Subscribe to our email list and stay up-to-date with all our awesome releases and latest updates.
MailChimp Icon