rollback yum update for a single package?

Josh Miller joshua at itsecureadmin.com
Mon May 5 15:05:49 UTC 2008


Alec O'Neill wrote:
> Thanks for your feedback, Chet.
> 
> Looks like none of the old RPMs are available anymore.  
> 
> The environment is an undocumented bunch of small boxes, most of them running some web environment on top of RHEL ranging from 2.1 to 5.1.  No two boxes are the same.
> 
> Unless someone knows how to rebuild packages based on the binaries on the system, I guess I'll just have to risk it.
> 


One way to enable rollback is to set the following value in your 
/etc/yum.conf:

tsflags=repackage

This will place the removed RPM in /var/spool/repackage

I also enable this for the rpm command, by placing the following entry 
in /etc/rpm/macros:

%_repackage_all_erasures 1


This will also place the "erased" RPM in /var/spool/repackage.

I would also recommend setting up a process to prune these packages 
before big patching events to make rolling back easier (ie, no guess 
work on which packages you've updated).

HTH,
Josh Miller, RHCE




More information about the redhat-list mailing list