If you have a dead installation, some will not boot you can use this commands, to get the list of installed programs.
grep -B 1 \ "^Status: install ok installed$" /media/recovery2/var/lib/dpkg/status | \ awk '/^Package:.*$/{print $2"\t\tinstall"}' | \ sort > package.list
And this command to install it on a new installation:
dpkg --set-selections < package.list apt-get dselect-upgrade