The other day I moved to new desktop hardware and wanted to have all the packages that I had on my old desktop there. I made a package list of both systems with dpkg -l, put them together and then extracted the ones only present on one system with uniq. Then I looped over that list with for p in `cat packages.txt`;do apt-get install $p;done . Well, that worked, but it was rather tedious. I finally stumbled upon
this mailling list post, which presented a much easier solution:
"
To make a local copy of the package selection states:
$ dpkg --get-selections "*" >myselections # or use \*
"*" makes myselections include package entries for "purge" too.
You transfer this file to another computer, and install it there with:
# apt-get update
# dpkg --set-selections <myselections
# apt-get -u dselect-upgrade
"
Works like a charm!
Keine Kommentare:
Kommentar veröffentlichen