Linux : How to rollback Yum updates on RHEL/CentOS

By | January 12, 2015

Having issues and downtime after installing latest updates using “yum update” is always a possibility. This is why having a development environment is so much important when you are running a mission critical infrastructure.

However, there is an intermediate solution : using the rollback feature included in Yum. Note this option is actually not enabled by default.

1. To enable rollback, simply edit the Yum config file and add the following setting :

And add :

Okay, now it’s enabled and will be effective for every new update you install. You’ll notice a new action named “Repackage” before the usual “Updating” stage is shown.

2. Add the following line into the rpm macro file (create if non-existent) :

And add :

3. Now you can use the following command to go back in time :

Note : All previous repackaged software will be stored into :



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.