11nov08
You may want to remove files/packages that are "orphaned" and not actually needed for any currently running programs:
apt-get autoremove
OR you may want to just totally remove something
sudo apt-get remove
OR
sudo apt-get purge examplepackage
BUT YOU MAY STILL HAVE TO MANUALLY RM/RMDIR any configuration files/directories
dpkg --get-selections > installed-software.txt apt-get autoremove
dpkg --set-selections < installed-software.txt dselect //allow to unselect packages?
Of course you may only want to restore a certain portion of a package... (e.g. restore Accidentally delete Apache Default configuration files)
mkdir /test apt-get download apache2.2-common dpkg -x apache2.2-common.deb /test cp /test/etc/apache2/ /etc/apache2/*