Difference between revisions of "Downgrading rpms"

From Atomicorp Wiki
Jump to: navigation, search
(Created page with '== How to downgrade an rpm == To roll back the rpm itself, you have two choices: 1) Use rpm 2) use yum (if your system supports a version of yum that can downgrade). '''Usin…')
 
Line 2: Line 2:
  
  
To roll back the rpm itself, you have two choices:
+
To roll back an rpm, you have two choices:
  
 
1) Use rpm
 
1) Use rpm
  
 
2) use yum (if your system supports a version of yum that can downgrade).
 
2) use yum (if your system supports a version of yum that can downgrade).
 +
  
 
'''Using RPM to downgrade a package'''
 
'''Using RPM to downgrade a package'''

Revision as of 17:17, 13 June 2010

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 mysql

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

yum --allow-downgrade install mysql-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

  1. exclude packages from updated

exclude=mysql


Method B)


yum downgrade mysql

Keep in mind that the depsolver doesn't understand how to do dependency downgrades in yum, so you will also need to specify anything that is dependent on the mysql upgrade.

Personal tools