* purge removed debian packages
Posted on August 23rd, 2010 by Alex. Filed under Linux.
The package manager on Debian based systems differs between removing a package and purging it. When a package is removed, the executable files and libraries (if not shared by others) are deleted from the hard disk. However the configuration files remain so that, if you reconsider your decision and reinstall a package, it does not need to be configured anymore. If a package is purged, all files belonging to the package are removed.
For many years I used to remove packages only. The recent problem was that over the time some changes were done to udev and it started to complain about an old format of a configuration file.
udevd[8055]: SYSFS{}= will be removed in a future udev version, please use ATTR{}= to match the event device, or ATTRS{}= to match a parent device, in /lib/udev/rules.d/someFile.conf
However this file belonged to a package that was removed a long time ago and hence not updated along with udev. I wanted to clean up my system and purge all removed packages. This can be time consuming task, if the package count of removed packages crosses some hundreds. Use
dpkg --get-selections | grep deinstall
to show removed packages and use
dpkg --get-selections | grep deinstall | wc -l
to count them.
Fortunately the package manager provides an easy command to purge all removed packages at once:
aptitude purge ~c