How do I force yum install even if it's a downgrade? [closed]

So the scenario is as follows: I have some systems that I download builds for from our CI server and install them. These builds are un-released builds, but the naming convention has a timestamp in it to determine newer builds. So I install one of these builds, test it, great.

Well, at some point I want to revert back to our actual released builds which are on our local yum repo. But if I did yum install -y somepackage, install is going to say that the version its trying to download is obsoleted by this unreleased version I've installed.

What I'm wondering is if there's a way to force yum to install the build even if its obsoleted by the currently installed one, or am I going to be forced to yum remove the installed build before yum installing the released build?

I don't mind doing the latter, but the former is a better solution because some high availability components that depend on this RPM complain when it goes missing, so I'm wondering if it's possible.

Thanks ahead of time!

2

5 Answers

Yes, you can install an older available version (of an already installed package) with the downgrade sub-command:

yum -y downgrade mypackage-1.2.3-4 

Note that you have to explicitly specify the version/release of the package you want to downgrade to.

This command is also available with dnf, the yum successor.

yum downgrade somepackage 

Also, commands under yum history may be of help to you in similar situations.

I have been looking for a solution as well. This is - sadly - the only workaround I could find:

pkg=package-1.2.3-0 yum -y downgrade $pkg yum -y install $pkg 

These commands will result in your exact version being installed; when downgrading or upgrading.

2

yum update-to <package-name>

0

For Centos 7 Static 32bit lib's:
Get

rpm -qlp glibc-static-2.17-307.el7.1.i686.rpm rpm -ivh glibc-static-2.17-307.el7.1.i686.rpm 

You Might Also Like