[linux] How to ignore conflicts in rpm installs

I have a bunch of rpm files in a folder. I am trying to install them using: rpm -ivh *.rpm so rpm can take care of the correct installation order.

On some of these rpms I have a newer version installed in my system so I get for example:

package info-5.0-1 (which is newer than info-4.13a-2) is already installed

/opt/freeware/man/man1/infokey.1 from install of info-4.13a-2 conflicts with file from package info-5.0-1

Is there a way to ignore the old .rpm file and resolve the dependency with the new version that is already installed? I thought of the --force option. But how --force resolves the conflicts? Overwrites them with the older version or just ignores them leaving the new version?

Any thoughts are welcome.

This question is related to linux unix rpm aix

The answer is


Try Freshen command:

rpm -Fvh *.rpm

From the context, the conflict was caused by the version of the package.
Let's take a look the manual about rpm:

--force
    Same as using --replacepkgs, --replacefiles, and --oldpackage.

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

So, you can execute the command rpm -Uvh info-4.13a-2.rpm --force to solve your issue.


The --force option will reinstall already installed packages or overwrite already installed files from other packages. You don't want this normally.

If you tell rpm to install all RPMs from some directory, then it does exactly this. rpm will not ignore RPMs listed for installation. You must manually remove the unneeded RPMs from the list (or directory). It will always overwrite the files with the "latest RPM installed" whichever order you do it in.

You can remove the old RPM and rpm will resolve the dependency with the newer version of the installed RPM. But this will only work, if none of the to be installed RPMs depends exactly on the old version.

If you really need different versions of the same RPM, then the RPM must be relocatable. You can then tell rpm to install the specific RPM to a different directory. If the files are not conflicting, then you can just install different versions with rpm -i (zypper in can not install different versions of the same RPM). I am packaging for example ruby gems as relocatable RPMs at work. So I can have different versions of the same gem installed.

I don't know on which files your RPMs are conflicting, but if all of them are "just" man pages, then you probably can simply overwrite the new ones with the old ones with rpm -i --replacefiles. The only problem with this would be, that it could confuse somebody who is reading the old man page and thinks it is for the actual version. Another problem would be the rpm --verify command. It will complain for the new package if the old one has overwritten some files.

Is this possibly a duplicate of https://serverfault.com/questions/522525/rpm-ignore-conflicts?


Examples related to linux

grep's at sign caught as whitespace How to prevent Google Colab from disconnecting? "E: Unable to locate package python-pip" on Ubuntu 18.04 How to upgrade Python version to 3.7? Install Qt on Ubuntu Get first line of a shell command's output Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? Run bash command on jenkins pipeline How to uninstall an older PHP version from centOS7 How to update-alternatives to Python 3 without breaking apt?

Examples related to unix

Docker CE on RHEL - Requires: container-selinux >= 2.9 What does `set -x` do? How to find files modified in last x minutes (find -mmin does not work as expected) sudo: npm: command not found How to sort a file in-place How to read a .properties file which contains keys that have a period character using Shell script gpg decryption fails with no secret key error Loop through a comma-separated shell variable Best way to find os name and version in Unix/Linux platform Resource u'tokenizers/punkt/english.pickle' not found

Examples related to rpm

yum error "Cannot retrieve metalink for repository: epel. Please verify its path and try again" updating ContextBroker How do I extract the contents of an rpm? How to ignore conflicts in rpm installs How to make rpm auto install dependencies setup.py examples? Determining the path that a yum package installed to How do I find which rpm package supplies a file I'm looking for? What is the minimum I have to do to create an RPM file? How to list the contents of a package using YUM?

Examples related to aix

Changing an AIX password via script? Find files in created between a date range How to ignore conflicts in rpm installs Create a copy of a table within the same database DB2 ORA-00060: deadlock detected while waiting for resource How to get the command line args passed to a running process on unix/linux systems? How to mkdir only if a directory does not already exist? What is the unix command to see how much disk space there is and how much is remaining?