Does anybody know of a good way of using an old /var/lib/dpkg/status file to quickly reinstall debian. I would like to be able to do this to reduce the amount of time it takes me to re-build a machine after an attack or for installing all the same packages as another web server instead of choosing all packages manually.
I have tried the following (rather clumsy) method: # grep -B1 -e "install ok" /var/lib/dpkg/status \|grep "Package:" |cut -d" " -f2 > installed.packages # apt-get install `cat installed.packages` This does not work as well as I first thought. plenty of "broken packages" This is a functionality of apt-get that would come in very handy I think. cheers, Andreas