How Best To Rollback From A Yum Update?

Home » CentOS » How Best To Rollback From A Yum Update?
CentOS 2 Comments

Suppose I want to upgrade a bunch of packages on a system, but in case the upgrade produces unexpected, undesired results, I want to be able to rollback the system to its original state. What is the best way to do that?

Often, I won’t have, or be able to find, packages for the current installed versions. I.e. If I haven’t upgraded postgres for 2 years, it may be that I can no longer find a package for the version I am currently running.

The ‘rollback’ feature of rpm and yum [1] looks promising, but I have a few concerns with it:

a) why isn’t the –rolback switch described in either the man page for rpm or the output from –help? This makes me think the –rollback switch is deprecated or otherwise unofficial.

b) how can I trim/purge the ‘repackaged’ rpms that by default go in /var/spool/repackage [2]? I don’t want to just leave them there forever, but if I trim/purge/delete them, how will the rpm database be updated to know that it can no longer rollback to the date that they were installed?



2 thoughts on - How Best To Rollback From A Yum Update?