Here's how I would do it. As root, run the following:
dpkg --get-selections | sed 's/\t.*//' > packages-list.txt
This will produce a nice, clean list of installed packages, perfect for using with apt-get install.
Or a crude way to get a list of the packages you have manually installed with aptitude you can grep the logs with something like
zcat /var/log/aptitude.* | grep INSTALL] && cat /var/log/aptitude| grep INSTALL]
(But beware, installs with aot-get or dpkg will not get recorded here, plus logrotate might have archived part of the log, which this method will not pick up!)
deborphan among other things returns diff and other essential packages though - so I wouldn't really recommend using it. – Grzenio – 2009-11-13T08:02:05.477