[SATLUG] dpkg set-selections (was Running a script in CLI)

Daniel J. Givens daniel at rugmonster.org
Fri Jan 11 12:03:51 CST 2008

<4786FFC5.3060907 at lookcee.com> <4787A3D2.9000805 at datanet.ath.cx>
Message-ID: <148a0f08a54178e2f53b756a02d300a3 at spinnaker.joyent.us>
X-Sender: daniel at rugmonster.org
User-Agent: RoundCube Webmail/0.1b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit

On Fri, 11 Jan 2008 11:13:54 -0600, Samuel Leon <leon36 at gmail.com> wrote:
> I
> personally keep a text file of all the packages that I have installed on
> my debian system (about 75).  Then if I ever need to reinstall or
> install on a different computer I just type in "sudo aptitude install"
> and then paste in the huge list of packages after that and hit enter.

An even easier thing you can do in this instance is by using further
functionality in dpkg. In my backup scripts, I include a 
"dpkg --get-selections > pkg.list". If I ever need to restore the system,
I can use the information stored in pkg.list to get all of my installed
and removed packages setup the way they were. To do that, I would simply
run "dpkg --set-selections < pkg.list" and then a quick
"apt-get dselect-upgrade". That little trick has saved me a lot of time
over the past few years.

More information about the SATLUG mailing list