[SLL] how to maintain same pkgs/versions on two machines with APT?

Will Mengarini seldon at eskimo.com
Thu Feb 28 01:33:26 PST 2008


* Phil Mocek <pmocek-sll at mocek.org> [2008-02-27 09:41]:
> I know how to get a list of packages with dpkg (use --get-selections
> switch) but I haven't found a way to also show versions.

`dpkg -l >$file` should do it, but note that `dpkg -l` is different;
that is, the presence of output redirection alters the output format,
because if output is to a terminal, dpkg squeezes its output
according to the terminal's line width.

-- 
                 Will Mengarini  <seldon at eskimo.com>
         Free software: the Source will be with you, always.


More information about the linux-list mailing list