sudo bash apt-get install dpkg dselect dpkg --get-selections > /root/dpkglistOK dselect mess around ;-) when finished: dpkg --set-selections < /root/dpkglistOK