2Dec/080
Taken from Shell-fu
This is taken from shell-fu.org still a pretty handy one liner though
aptitude search ~c | awk '{ print $2 }' | xargs aptitude -y purge
This will delete any packages that are not installed anymore which still has configuration files on the box
2Dec/080
deborphan and for loops
deborphan is a package in debian that list orphaned libraries in debian. Handy for removing libraries that is no longer needed on a server. The problem with deborphan is that it only lists packages that are orphaned but doesnt remove them, so I do this:
for i in `deborphan`; do sudo aptitude remove $i; done
I love BASH