9

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.

0

1 Answer 1

20

Try using YUM's shell transactions:

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.