
On Mon, May 07, 2012 at 11:23:03AM +1000, Jason White wrote:
Andrew Spiers <andrew@andrewspiers.net> wrote:
dpkg --get-selections | awk '{ print $1 } ' will get you just the list you need, and you should then be able to pipe that into apt-get or aptitude with something like xargs apt-get install < /tmp/selections
Or just use dpkg --set-selections on the new system, which will take as input the output of --get-selections on the old one.
yep. also, use 'dpkg --get-selections "*"' to get the state of *ALL* packages, including installed, never-installed, removed, and purged packages. e.g. on server1: dpkg --get-selections "*" > /tmp/server1.selections scp /tmp/server1.selections server2:/tmp/ on server2: apt-get update dpkg --set-selections < /tmp/server1.selections apt-get dist-upgrade or even: dpkg --get-selections "*" | ssh server2 dpkg --set-selections craig -- craig sanders <cas@taz.net.au> BOFH excuse #8: static buildup