[sf-lug] synaptic save markings

Michael Paoli Michael.Paoli at cal.berkeley.edu
Tue Nov 25 22:35:11 PST 2008

> Date: Mon, 24 Nov 2008 14:04:28 -0800
> From: "Ted Nebus" <x351912 at gmail.com>
> Hey, with all this apt-get talk I was reminded of something I wanted
> to do but didn't know how. In synaptic i know before you install items
> you can save markings. Well I was wonder if I could save the list of
> everything i have installed.
> This reason for this is because if I do want to say, play around with
> a spare partition of some alpha software I would want to be able to
> simply load the markings, and it would install what I already had
> installed on another partition.
> Any thoughts?  Even if its not with synaptic?

At least for Debian, and likely also other Debian based distributions:

dpkg --get-selections
dpkg --set-selections

--get-selections tells you packages, but not precise versions
--set-selections doesn't cause the packages to be installed, but
rather, alters the package system's idea of what one does/doesn't
want to have installed.

use of:
dpkg --list
is generally more suited for human consumption - e.g. it includes
headers and will truncate things to get colums to fit within your
terminal width (or presumed/default width).  One can set/alter COLUMNS
in the environment to change dpkg's idea of the width to use, e.g.:
$ COLUMNS=240 dpkg --list

> Date: Mon, 24 Nov 2008 14:42:27 -0800
> From: "Jesse Zbikowski" <embeddedlinuxguy at gmail.com>
> dpkg --list

More information about the sf-lug mailing list