Downgrading rpms

From Atomicorp Wiki
Revision as of 11:56, 10 April 2014 by Mshinn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: This article is provide as a courtesy. Please contact your OS vendor for assistance with downgrading rpms.

How to downgrade an rpm

To roll back an rpm, you have two choices:

1) Use rpm

2) use yum (if your system supports a version of yum that can downgrade).


Using RPM to downgrade a package

Lets start with rpm, because all systems support this otion. To rollback an rpm you need to have the original RPMs, which may be on your system in this directory:

/var/cache/yum/

You'll have to look thru the subdirectories to see if the original RPMs are still cached by your system. If its not, then you will need to either download an older version of the rpms from our archives, or from your OS vendor depending on what version and build you want to use.

With rpm, you have two methods:

Method A)


Step 1: remove the original RPMs like this:

rpm -e -nodeps packagename

Step 2: And the install the older software:

rpm -Uvh packagename.oldversion.rpm

Method B: Or you can try using rpms oldpackage feature:

rpm -Uvh --oldpackage packagename.oldversion.rpm

Keep in mind that neither of these methods understands depdency downloading, so you will need to identify all the dependency packages that also need to be removed, and reinstalled.

Using Yum to downgrade a package


You can downgrade packages using two methods with yum,both of these are only supported with newer versions of yum. If they do not work on your system, then you will need to use the rpm methods above.

Method A)

Step 1: Remove the software

yum remove package

Step 2: Reinstall an older version, using the --allow-downgrade option:

yum --allow-downgrade install package-1.2.3.4

Change the version number to the version you want to install for your system.

Step: Finally, since you downgraded, yum will need to know not to upgrade this package:

vim /etc/yum.conf

# exclude packages from updated
exclude=mysql


Method B)


yum downgrade package-1.2.3.4

This will install version 1.2.3.4 of the pacjage on your system. Keep in mind that in older versions of yum that support "downgrade", the depsolver doesn't understand how to do dependency downgrades in yum. If you have one of those versions of yum you will also need to specify anything that is dependent on the package downgrade. If you have a newer version yum, it should work out the dependencies for you.

Personal tools