repos and latest version question

Issues related to applications and software problems
Post Reply
hokie1999
Posts: 25
Joined: 2011/08/10 15:03:16

repos and latest version question

Post by hokie1999 » 2020/03/23 13:46:50

Can someone verify this:

On CentOS 7, when installing a package via yum, if the version number is not specified, the latest/newest version of that package is selected from the repo and installed. This assumes the repo (when I say repo, I'm speaking of a corporate repo we manage) has been updated via createrepo -d .

For instance say a repo has these versions of httpd:

2.4.6
2.3.11
2.2.34

A yum install like so:

yum -y install httpd

ONLY installs 2.4.6

Could use confirmation on this.

Thanks! :D

User avatar
TrevorH
Forum Moderator
Posts: 28084
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: repos and latest version question

Post by TrevorH » 2020/03/23 14:52:01

Yes, it will pick the highest version number available. That behaviour can be altered by use of things like yum-plugin-priorities (now built into yum itself) where you can assign different priorities to different repos with 1 being the most preferred and 99 being the least. If the same named package is found in two different repos with different priorities then it will pick the one from the repo with the highest priority and use that. You should ordinarily assign priority=1 to all CentOS supplied repos so that packages from base/updates are preferred over ones supplied from other repos but if you maintain your own repos and wish those to be picked first then you would need to adjust that.

You can also use includepkgs= in the individual repo files to restrict it to selecting only those named packages from that repo. Similarly you can use exclude= to remove packages from a particular repo.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

hokie1999
Posts: 25
Joined: 2011/08/10 15:03:16

Re: repos and latest version question

Post by hokie1999 » 2020/03/23 18:06:24

Thanks, again! :P

Post Reply

Return to “CentOS 7 - Software Support”