
Hi All, This the best forum for such a question? I'm using Ubuntu Lucid (until July, when I'll go over to Precise). Wondering if there's any sort of terminal command parameter for apt, or menu option in Synaptic, where I can get a dump or list of every package currently installed in my laptop Lucid system? But wait, there's more... I want to =use= this list to "synchronise" with my desktop Lucid, which has been in storage for 9 months. i.e. I want to use the output of my laptop to tell apt or Synaptic to install all those programs not already on the desktop. There will be some already installed, obviously. I'd update all packages on both systems first. This is a potential time-saver, compared to doing it manually. Have searched and researched, but can't figure it out. Thanks, Carl Turney Melbourne Mobile 0427 024 735

On 07/05/12 10:34, Carl Turney wrote:
Hi All,
This the best forum for such a question?
I'm using Ubuntu Lucid (until July, when I'll go over to Precise).
Wondering if there's any sort of terminal command parameter for apt, or menu option in Synaptic, where I can get a dump or list of every package currently installed in my laptop Lucid system? But wait, there's more...
I think dpkg --get-selections is the command you are looking for. You can then use awk 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

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.

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
participants (5)
-
Andrew Spiers
-
Carl Turney
-
Craig Sanders
-
Jason White
-
Trent W. Buck