How to replace one package with another using yum?
21,997
Try using YUM's shell transactions:
# yum shell
>
> remove <package>
> repo disable <repo ID of not required package>
> install <package>
> run
> exit
Related videos on Youtube
Author by
Deer Hunter
Updated on September 18, 2022Comments
-
Deer Hunter over 1 year
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. -
Deer Hunter over 9 yearsBrilliant! (extra characters added)
-
Deer Hunter over 9 yearsAlso possible to do:
yum swap -- remove foo -- install bar
(not tested). -
HeroFromEarth almost 5 years@DeerHunter, yum in CentOS 6 doesn't have 'swap' command. garethTheRed's answer works on CentOS 6 too