8

This question already has an answer here:

I must be missing something obvious here. If there are two equally versioned RPM packages of the same software product, with one of them installed on one of my rigs (with a metric tonne of packages as dependencies), how can I replace it with another without going through the hassle of erasing and reinstalling an insane number of dependent packages?

I'd like to do it via yum. rpm-based solutions (with forcing) are grudgingly accepted.

marked as duplicate by Deer Hunter, chaos, Anthon, slm Oct 1 '14 at 14:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

15

Try using YUM's shell transactions:

# yum shell
>
> remove <package>
> repo disable <repo ID of not required package>
> install <package>
> run
> exit
  • Brilliant! (extra characters added) – Deer Hunter Oct 1 '14 at 9:16
  • 3
    Also possible to do: yum swap -- remove foo -- install bar (not tested). – Deer Hunter Oct 1 '14 at 9:21
  • @DeerHunter, yum in CentOS 6 doesn't have 'swap' command. garethTheRed's answer works on CentOS 6 too – HeroFromEarth Jun 26 at 12:45

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