Submitted by Drew
I can't remember where I learned this but I use it whenever I need to reinstall Ubuntu on my machines, or when I am doing a fresh install on a new machine. What this does is very simple.
The first step creates a text file with a list of installed programs and after reinstalling Ubuntu you will be able to apply that list and reinstall all of the programs without searching through endless amounts of packages trying to find out what programs you are missing.
Pros: Very easy to do. Just three commands and you are back up and running. Not much interaction from the user.It just works.
Cons: Requires some initial setup.
Depending on the amount of applications you originally had installed, downloading and installing those packages may take some time. Prerequisites: Your 'home' folder must be on a separate partition. I will explain later in this article. Let's get started. The first step you will have to do is create a text file.
Full article here:
How to Setup Ubuntu for Reinstalling your applications without losing your data | MyBrainRunsLinux.com