Product SiteDocumentation Site

4.3.2. Set Repository Priorities

This is optional, and recommended only for advanced users. yum normally installs the latest version of a package, regardless of which repository provides it. Using this plugin will change this behaviour, so that yum will choose package versions primarily based on which repository provides it. If a newer version is available at a repository with lower priority, yum does not upgrade the package. If you simply wish to prevent a particular package from being updated, the instructions in Section 4.3.3, “Prevent a Package from Being Updated” are better-suited to your needs.
  1. Install the yum-plugin-priorities package.
  2. Use a text editor or the cat or less command to verify that /etc/yum/pluginconf.d/priorities.conf exists, and contains the following text:
    enabled = 1
    If you want to stop using the plugin, you can edit this file so that it contains enabled = 0 This allows you to keep the priorities as set in the repository configuration files.
  3. You can set priorities for some or all repositories. To add a priority to a repository, edit its respective file in the /etc/yum.repos.d/* directory, adding a line like: priority = N where N is a number between 1 and 99, inclusive. A priority of 1 is the highest setting, and 99 is the lowest. You will need to set priorities of at least two repositories before this becomes useful.