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 would like to upgrade package A and at the same time erase package B.

There are dependencies between the packages so I would like to do both operations as one transaction.

This can be done with 2 commands:

rpm --erase packageB.rpm rpm -Uvh packageA.rpm

Can it be done as one command?

share|improve this question

You can't do it with the rpm command on the command line, but you can do it with yum shell:

# yum shell
Setting up Yum Shell
> install package1
> erase package2
> run
share|improve this answer

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.