How do I manage Yum priorities under Oracle Linux? — oracle-tech

    Forum Stats

  • 3,708,771 Users
  • 2,241,125 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How do I manage Yum priorities under Oracle Linux?


My servers are currently running CentOS 7. I have the yum-plugin-priorities package installed. It's an official package which (as the name suggests) allows me to set priorities.

Here's a brief example to illustrate how this plugin works:

  • Official repositories all have a priority set to 1 in my configuration.
  • EPEL has a priority set to 10, which means a package from EPEL that has the same name than one found in the official repos can never squash it.
  • The Lynis repository (providing the Lynis tool) has a priority of 5, which means the lynis package from this repo takes precedence over the one in EPEL. At the same time, a package in this repository can never squash anything from the official repos.

I've been using this little plugin since CentOS 5.0 was released. I try to find it under OL7 and OL8, but it seems nowhere to be found.

Is there a way to handle priorities with Yum under Oracle Linux ?

Cheers from the sunny South of France,



  • Avi Miller-OracleAvi Miller-Oracle Senior Manager, Oracle Linux and Virtualization Product Management Melbourne, AustraliaPosts: 4,656 Employee
    edited December 2020

    Exactly the same way as you did with CentOS. However, one of the differences between RHEL/OL and CentOS is the existence of the ol7_optional_latest channel in which this and lots of other packages can be found.

    If you can't find a package from CentOS' base or updates repo in ol7_latest, it'll almost certainly be ol7_optional_latest.


    # yum-config-manager --enable ol7_optional_latest
    # yum info yum-plugin-priorities
    Loaded plugins: ovl, ulninfo
    Available Packages
    Name : yum-plugin-priorities
    Arch : noarch
    Version : 1.1.31
    Release : 54.0.1.el7_8
    Size : 29 k
    Repo : ol7_optional_latest/x86_64
    Summary : plugin to give priorities to packages from different repos
    URL :
    License : GPLv2+
    Description : This plugin allows repositories to have different priorities.
      : Packages in a repository with a lower priority can't be overridden by packages
      : from a repository with a higher priority even if repo has a later version.
    # yum install yum-plugin-priorities
  • MicrolinuxMicrolinux Posts: 7 Newbie

    Thanks very much, Avi. That did the trick.

    I integrated everything into my script... and I can't even show you the result, because of my newbie status.

    Correct me if I'm wrong : as far as I understand, this is all valid for Oracle Linux 7. Starting with version 8.0, Yum links to DNF under the hood, which offers native support of priorities. So in theory, simply adding priority=n to a repository's stanza should do the trick.

    Cheers from the sunny South of France,


Sign In or Register to comment.