[NBLUG/talk] How to undo a yum update

Eric Eisenhart eric at nblug.org
Sun Sep 25 14:30:16 PDT 2005


I know it's way too late to help in the situation that was being discussed
on the list, (but maybe it'll help somebody down the road) but if you use
up2date instead of yum rollbacks are possible.  Then the answer would've
been "run 'up2date --undo'", possibly with an 'up2date --list-rollbacks' in
there.  It might be possible to do with yum with an rpm setting, but I've
never tried that...

How?
Find the "enableRollbacks" line in /etc/sysconfig/rhn/up2date and make it
look like this:
enableRollbacks=1

Look in /etc/sysconfig/rhn/sources for how to add whatever sources you've
got yum configured for (up2date's been able to use yum sources for quite
some time; apt was added in FC3/RHEL3, I believe...)

Downsides:
1) since an RPM of each package getting upgraded is made whenever you
install/upgrade via up2date, package installations take longer.
2) Disk is used for those RPMs...
3) up2date's harder to use on the command line than yum.


According to this article: http://www.linuxjournal.com/node/7034/print it's
possible to set up rollbacks in RPM itself with "%_repackage_all_erasures 1"
in /etc/rpm/macros...  I've never tried it this way...  And whether or not
it works with yum depends on exactly how they did 


Here's the main up2date command lines to learn if you go that route:

up2date somepackage (download and install somepackage and any dependencies)
up2date -du (download and list updates)
up2date --solvedeps='foo' (install whatever package satisfies the 'foo'
                          dependency; could be 'foo' package...)
up2date -u (update)
up2date -fu (update including the kernel)
up2date --showall (pipe this into grep)
up2date (GUI interface for updating)
-- 
Eric Eisenhart
NBLUG Co-Founder, Scribe and InstallFest Coordinator
The North Bay Linux Users Group -- http://nblug.org/
eric at nblug.org, IRC: Freiheit at fn AIM: falschfreiheit



More information about the talk mailing list