Cleaning up after default Ubuntu server installation
Recently I had install Ubuntu 7.04 server edition for testing purposes. And I’m a little disappointed with it. There is a lot of unwanted packages/dependencies in default installation, so I’ve spent some time to clean up it.
After cleanup I have found that there is a lot of configuration files left in system. So here is a short note how-to purge all configuration files:
dpkg -P $(dpkg --list | grep ^rc | awk '{ print $2; }')
This command builds a list of removed packages that still has their configuration files installed. Then it pass this list to dpkg to purge all obsolete files.