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

yum force install conflict
yum force install without dependencies
yum install force reinstall
yum install force yes
yum force install older version
yum force install obsolete package
rpm force install
yum force downgrade

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!

yum downgrade somepackage

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

Is there any way to 'force' a yum install/update?, Download rpm you want to install. yum erase package #to get rid of the Is there any way to force a yum install or update to work even when it� $ yum -y install php54w excerpt from the yum man page -y, --assumeyes Assume yes; assume that the answer to any question which would be asked is yes.

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.

How to force yum to reinstall a package, When replacing packages in place, I much prefer to use rpm's --force. It will install over even if the same package is installed, without leaving it� Neither yum update nor yum install seem to work with allow-downgrade. (It does not seem to do anything?). Does anyone have a working example for yum --allow-downgrade? This is what I tried: 1) Show current yum version [root]# yum --version 3.2.22 [root]# yum info yum-allowdowngrade Installed Packages Name : yum-allowdowngrade Arch : noarch

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.

Yum Cheat Sheet, Downgrade a package This will install the package's previous version. Reinstall a single package Sometimes, it's necessary to force� Chris G wrote: > Is there any way to force a yum install or update to work even when it > normally fails because of some errors? > > I am trying to install a 32-bit version of a library on a 64-bit > system and it fails only because the manual pages conflict with the > already installed 64-bit library manual pages.

yum update-to <package-name>

How to force Yum to install an older package which "is obsoleted by , I couldn't find a way to do this with Yum only. What I ended up doing was a two step process: Use rpm to remove the mysql-commercial-* packages, but don't� It's a MySQL-specific issue that I didn't want to get into here. I'm hoping to work around this MySQL-specific issue by simply using Yum to install an equivalent version of mysql-community on this server. – Stefan Lasiewski May 22 '18 at 23:58

Using RPM you can do this Try the following:

$ rpm -Uvh --oldpackage pkg1.rpm pkg2.rpm

excerpt from rpm man page

rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...

This upgrades or installs the package currently installed to a newer version. This is the same as install, except all other version(s) of the package are removed after the new package is installed.

--oldpackage Allow an upgrade to replace a newer package with an older one.

Just get all the dependencies from rpm and install.

How do I force yum install even if it's a downgrade?, 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 � Install the yum-utils package: # yum install yum-utils Run the command followed by the desired package: # yumdownloader <package> Note: The package is saved in the current working directly by default; use the --destdir option to specify an alternate location. Be sure to add --resolve if you need to download dependencies.

Download all dependencies with yumdownloader, even if already , This prevents yum from resolving and then skipping dependencies that are already installed on the system. sudo yum install \ --installroot=</path/to/tmp_dir> \ --� Follow the steps to install the downloadonly plugin for yum as given by Red Hat. Basically, on CentOS 6.x, do: $ sudo yum install yum-plugin-downloadonly.noarch Then make use of the plugin in combination with the --installroot switch of yum.

How do I force yum to install without prompting the user, using bash , You can use the -y switch: $ yum -y install php54w excerpt from the yum man page -y, --assumeyes Assume yes; assume that the answer to any� While still on the client system, run a command to install a package with the yum package manager: sudo yum install httpd The system should accordingly reach out to your server and install the software.

Yum (Yellowdog Updater, Modified) HOWTO: Introduction, Eventually (sometimes out of sheer frustration) an rpm is --force installed, and In balance, any professional LAN manager (or even humble standalone linux� For some operations (for example, a yum install operation), Yum downloads the packages to install into the Yum cache. The cached packages are located in a subdirectory structure from /var/cache/yum that reflects the architecture, the distribution release, and the repository from where the packages were downloaded.

Comments
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask. Also see Where do I post questions about Dev Ops?
  • @jww thanks for the heads up, I didn't know SO had branched out the infrastructure and ops pieces out into their own pages.
  • Tested this under CentOS 7, and there a yum downgrade package-1.2.3.0 was sufficient - i.e. no additional yum install ... required. Is the .rpm suffix in your answer an oversight?
  • Yes yum downgrade suffices I it is a downgrade, but not when it is an upgrade and vice-versa