How to create a list of installed packages for easy/automatic reinstall after disk is formatted

view full story

http://unix.stackexchange.com – I'll change my system from 32 bits to 64 bits, and will be the same I had before, Debian Squeeze, but I do not want to lose the programs I installed before, because I do not remember the name of them all. So I wanted a command to do this for me, save the name of all the programs I installed on a file, BUT NOT THE STANDARD PROGRAMS THAT CAME WITH THE SYSTEM, and when I'm using the other system I would mention the name of the file and your directory for everything to be installed automatically. ONE MORE QUESTION: Is it possible to do this with programs that were installed manually with dpkg- (HowTos)