Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
This answer is perfect. I did overlook that... – jgb Jul 3 '13 at 9:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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