I have two rpm packages wich should not get installed together.

After googling around i assume there is no RequiresNot tag or something similar to specify incompatible packages in a specfile.

What is the best solution to prevent installing them together?

Currently i'm using rhel but i would prefer a solution wich is not rhel/yum related (eq using: exclude=packageA in repo.conf).

1 Answer 1


There is a tag that can be used in a spec file to explicitly disallow two conflicting packages to be installed:

The conflicts Tag

The conflicts tag is the logical complement to the requires tag. It is used to specify which packages conflict with the current package. RPM will not permit conflicting packages to be installed unless overridden with the --nodeps option.

The conflicts tag has the same format as requires. It accepts a real or virtual package name and can optionally include version and release specifications or a serial number.

  • This answer is perfect. I did overlook that...
    – jgb
    Jul 3, 2013 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.