debian housekeeping

script /common/scripts/

apt-get install deborphan debfoster

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

the later will clean the /var


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.


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

Hits: 6