I don't want to wipe my hard drive. I just want to get rid of all the extra software I've installed over time, and return to a prisitine, default system.
I do this occasionally, using aptitude. Aptitude is a console ("old-skool") tool that's powerful but a little tricky to get to use. It's like vim or emacs, when Ubuntu Software Center is like Gedit or AbiWord :-) Nevertheless, there's a good way to achieve your goal in aptitude, so if you're willing to give it a try, this might work for you.
First install aptitude:
sudo apt-get install aptitude
You might want to read the docs for aptitude. If you don't, you'll be following my directions below blind, and could fly into a mountainside that leaves your system unbootable, in which case you'll need to try one of the "careful reinstall" options where you do a fresh install trying to preserve your personal data along the way. The docs for aptitude are at:
Now, go into aptitude. I'll tell you a series of keys to press. The case (upper or lower) is significant: U is different to u.
u (this updates the package database. press enter to clear any warnings that popup afterwards)
arrow down to the section called "Installed packages"
M (this marks every package as automatically installed, so it schedules all of them for removal. don't quit now or you'll be in trouble)
/ (this opens a search dialog)
+(this tells aptitude you want to install ubuntu-desktop and all dependencies)
[ENTER] (goes into the details for the ubuntu-desktop package)
arrow down to the "Recommends" line
+ (tells aptitude to install all the recommended packages too)
g ("go" - will tell you what it wants to do)
g (confirms that you want to do it, and gets going)
That should leave you fully up to date, with a relatively clean, minimal desktop system.
If you get stuck, hit ? for help in aptitude. You may need to use a or z to scroll up and down in various places. I did say it was old-skool :-) But once you know how to use it, you can get a lot of detailed package management done quickly.
You can reinstall without losing your data if you follow the instructions here.
To simply get a "fresh desktop" the easiest way would be to create a new user that always starts off with a clean and default desktop. If there is still the one or other package in your way it's probably the least time consuming thing to just purge these single packages.
Removing software you installed or performing a reinstall of Ubuntu only makes sense if the amount of harddisk space occupied is significant or if many of the apps are buggy and affect the system performance.
Before you proceed with deleting or reinstalling I recommend you check first if your system performance will really benefit from doing so.
There is an easier and less intricate way of achieving Mark's solution.
sudo apt-get install aptitude sudo aptitude markauto '~i !~M !ubuntu-desktop'
The former command installs
The latter command says "Mark every manually installed package that is not
ubuntu-desktop as automatically installed".
aptitude will then interpret all packages that are not required or recommended by
ubuntu-desktop as unnecessary dependencies, and remove them.