Thursday, August 2, 2012

Rolling back yum packages RedHat/CentOS/Fedora


*To configure yum to save rollback information, add the line tsflags=repackage to /etc/yum.conf.

*To configure command-line rpm to do the same thing, add the line %_repackage_all_erasures 1 to /etc/rpm/macros (If does not exist, just create it).

*If/when you want to rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specified. 

Some examples: 
rpm -Uhv --rollback '10:00 am'
rpm -Uhv --rollback '6 hours ago'
rpm -Uhv --rollback 'july 25'.

enabling rollbacks will consume additional disk space in the /var filesystem.
Post a Comment