tested on: Linux DebianGiada 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 GNU/Linux

BE VERY CAREFUL WHEN REMOVING PACKAGES! YOUR SYSTEM COULD BREAK!

# purge = remove config files
# remove = keep config files
# this is pretty save
apt-get --purge remove;

# clean the /var
apt-get clean;

# this also seems an interesting option:
# autoremove is used to remove packages that were automatically installed to 
apt-get autoremove;

you are right, ‚apt-get remove‘ does not do the job throughly, the solution to your problem, IMHO, can be solved this way, which is what i do in order to remove everything pertaining to the package in question:

want to know more? now comes the dangerous stuff:

# install software to find unused packages
apt-get install deborphan debfoster;

# remove a package
apt-get remove --purge;

# clean the /var
apt-get clean;

# this also seems an interesting option: autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
apt-get autoremove;

# weed unnecessary Debian packages, will show files and libraries still left after the apt-get remove --purge, if you don't recognize a library, keep it, later on,
debfoster;
# will give you a list of 'orphaned' libraries that are hanging with no use, and are safe to nuke.
deborphan;

if you make a mistake with debfoster, type ‚u‘ and will ask you again if you want to keep it. When you are thru with it, invoke deborphan.

deborphan

will give a list of libraries that are hanging just taking space, to get rid of them:

deborphan | xargs apt-get -y remove purge

when thru with that:

apt-get clean

recently after a dist-ugrade to sid, it installed emacs21, i removed it, and debfoster found some files like emacsen, etc.

now, i don’t know if dpkg –purge is any better, i should try that sometime.

http://www.linuxquestions.org/questions/debian-26/how-do-i-get-apt-get-to-completely-uninstall-a-package-237772/

admin