Brute force removal of a deb package in Ubuntu

Today  I was  playing with ubuntu 9.04 .  I tried to install  wwwoffle the  off-line  proxy server.  At the end of installation it failed with a  ” Sub process /usr/bin/dpkg failed ” message.  There was some thing wrong.    Fixing the system required removal of the package. I tried the following in succession in vain.

# apt-get remove wwwoffle

#dpkg -P wwwoffle

#dpkg –force-all  -r wwwoffle

I was stuck.  I did a manual removal of the deb package like this.

a) List out all the file of the deb package.

# dpkg -L wwwoffle

b) Removed all the files from the above list by hand.  If you are smart enough you can write a script for that.

c) Remove the package using apt

#apt-get remove wwwoffle