RHEL5 Rollback RPM Update

Taken from here: http://blog.chris.tylers.info/index.php?/archives/17-How-to-Rollback-Package-UpdatesInstallation-on-Fedora.html

Fedora Core 5, like FC4, uses yum for package management. yum is built on top of rpm, and pirutpup, and yumexare graphical interfaces built on top of yum. Together, these tools provide a simple-to-use, powerful package management system.
One of the least-known secrets about rpm is that it can rollback (undo) package changes. It can take a fair bit of storage space to track the information necessary for rollback, but since storage is cheap, it’s worthwhile enabling this feature on most systems. This is a feature I’ve used several times while writing the book Fedora Linux.

Here’s cut-to-the-chase directions on using this feature:

  1. To configure yum to save rollback information, add the line tsflags=repackage to /etc/yum.conf.
  2. To configure command-line rpm to do the same thing, add the line %_repackage_all_erasures 1 to /etc/rpm/macros.
  3. Install, erase, and update packages to your heart’s content, using puppirutyumexyumrpm, and the yumautomatic update service.
  4. If/when you want to rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specifier. Some examples: rpm -Uhv --rollback '9:00 am'rpm -Uhv --rollback '4 hours ago'rpm -Uhv --rollback 'december 25'.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s