Re Undoing an update

Jack quiet_celt at yahoo.com
Fri Jan 30 14:27:14 CST 2009


I forgot to tell you how to save and restore for future reference.

Here they are.

------------------------------------------------------------
To save your installed list do this:

dpkg --get selections | grep -v deinstall > packagestateXXXXXXXX.txt

where XXXXXXXX is the current date. Or use your own convention.
The grep -v deinstall removes entries of packages that are marked for removal.

===============================================================

To later restore them do this:

dpkg --clear-selections
dpkg --set-selections < packagestateXXXXXXXX.txt
apt-get -u dselect-upgrade --purge

----------------------------------------------------------------

Note this is all commandline stuff and assumes you are logged in as root. Simply prepend "sudo" to each line if you are not root. Note, also this is destructive. I believe it might remove and purge some software not on this list. I've never tried this so proceed at your own risk. Alternatively you could remove the --purge option to not purge any config files on anything it might remove.

There might be a utility out there to do this for you, but I dn't know of it.

Brian J




More information about the Kclug mailing list