Downloading RPMs in Linux¶
This article is provide as a courtesy. Please contact your OS vendor for assistance with downgrading rpms.
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:
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.
Step 1: Remove thr original RPMs by running the following command for each RPMrpm -e -nodeps packagename
Step 2: Install the older software by running the following commandrpm -Uvh packagename.oldversion.rpm
Step 1: Use the RPMs oldpackage feature by running the following commandrpm -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.
Step 1: Remove the software by running the following commandyum remove packagename
Step 2: Reinstall an older version using the –allow-downgrade optionyum --allow-downgrade install package-126.96.36.199
Step 3: Finally, since you downgraded, yum will need to know not to upgrade this pacakge, so add the package to /etc/yum.conf like the followingvim /etc/yum.conf #Add the following lines based off of your package name #exclude packages from updated exclude=mysql
Step 1: Run the following commandyum downgrade package-188.8.131.52
The step above will nstall version 184.108.40.206 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.