Difference between revisions of "Downgrading rpms"

From Atomicorp Wiki
Jump to: navigation, search
m
Line 45: Line 45:
 
Step 1:  Remove the software
 
Step 1:  Remove the software
  
yum remove mysql
+
yum remove package
  
 
Step 2:  Reinstall an older version, using the --allow-downgrade option:
 
Step 2:  Reinstall an older version, using the --allow-downgrade option:
  
yum --allow-downgrade install mysql-1.2.3.4
+
yum --allow-downgrade install package-1.2.3.4
  
 
Change the version number to the version you want to install for your system.
 
Change the version number to the version you want to install for your system.
Line 57: Line 57:
 
vim /etc/yum.conf
 
vim /etc/yum.conf
  
# exclude packages from updated
+
<pre># exclude packages from updated
exclude=mysql
+
exclude=mysql</pre>
  
  
Line 64: Line 64:
  
  
yum downgrade mysql
+
yum downgrade package-1.2.3.4
  
Keep in mind that the depsolver doesn't understand how to do dependency downgrades in yum, so you
+
This will install version 1.2.3.4 of the pacjage on your system.  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.
+
will also need to specify anything that is dependent on the package downgrade.

Revision as of 17:19, 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 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 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 package downgrade.

Personal tools