4

What's the best (ie foolproof and easy) mechanism for rolling back an rpm update using YUM?

I've not come across the problem where I upgrade something and later find I want to downgrade it, but I'd rather be prepared for when it does happen.

gbjbaanb
  • 3,902

2 Answers2

3

This appears to be a fairly easy to follow procedure for doing it: Yum Rollback

It does involve making some configuration changes to yum, but seems pretty easy. To summarize the link:

  1. Add ‘tsflags=repackage’ to /etc/yum.conf
  2. Add ‘%_repackage_all_erasures 1’ to /etc/rpm/macros

And when you want to rollback use the ‘--rollback’ flag within rpm. Like I said, seems pretty brain dead easy.

Scott Pack
  • 15,097
2

Just use the --oldpackage switch with the older rpm:

rpm -Uvh foo.rpm --oldpackage