debian housekeeping

script /common/scripts/debianHK.sh

http://www.linuxquestions.org/questions/debian-26/how-do-i-get-apt-get-to-completely-uninstall-a-package-237772/
http://www.rootkit.nl/files/lynis-documentation.html

apt-get install deborphan debfoster

#apt-get remove –purge package
#apt-get clean

the later will clean the /var

#debfoster

will show files and libraries still left after the apt-get remove –purge, if you don’t recognize a library, keep it, later on, deborphan will give you a list of ‘orphaned’ libraries that are hanging with no use, and are safe to nuke.

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.

aptitude purge ~c
apt-get autoremove

Also you do not need the “remove” when doing apt-get remove –purge package, just apt-get purge package.

deborphan | xargs apt-get -y remove –purge

To remove all orphaned data packages run:

deborphan –guess-dev | xargs apt-get -y remove –purge

To see all the orphaned packages on your system run:

deborphan –guess-all

Leave a Reply