One of these packages - debian-reference - was upgraded today. On a whim I started going through it, and I stumbled on a solution to a problem that was nagging me for a while:
I only backup a restricted set of files, under the assumption that if I ever need to restore a system from scratch I'll simply install a new system and configure it using the restored configuration files. The problem here is that I need a way to re-install all the packages that I'm already using. I don't have a good way of doing this, and even if I had, there's the issue of configuring all these packages upon installation - a tedious if not impractical process.
Section 6.4.9 of the Debian Reference provides the solution. To backup your system package configuration, install debconf-utils and run
I intend to run these commands as part of the nightly backup process.
dpkg --get-selections "*" > myselections
debconf-get-selections > debconfsel.txt
To restore it run the following commands
(I haven't tested the latter, and I hope I don't ever need to do it...)
debconf-set-selections < debconfsel.txt
dpkg --set-selections < myselections
apt-get -u dselect-upgrade