There’s a little-known option in RPM that enables the rollback of package installs. Think of it like an undo option in your favorite application; it will rollback the package install to a previously known state/version. Yum support this option in Fedora Core 4 (and upcoming Core 5); here’s an excerpt taken from Chris Tyler’s posting on OreillyNet:
Here are cut-to-the-chase directions on using this feature:
- 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.
- Install, erase, and update packages to your heart’s content, using pup, pirut, yumex, yum, rpm, and the yum automatic update service.
If/when you want to rollback to a previous state, perform an rpm update with the --rollback option followed by a date/time specification. Some examples: rpm -Uhv --rollback '9:00 am', rpm -Uhv --rollback '4 hours ago', rpm -Uhv --rollback 'december 25'.
As Chris mentions, keep in mind that you’ll be using lots more storage space to keep prior versions of packages around.