If you have a dead installation, some will not boot you can use this commands, to get the list of installed programs.
1 2 3 4 |
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:
1 2 |
dpkg --set-selections < package.list apt-get dselect-upgrade |