YUM plug-ins are small programs that extend and improve the overall performance of the package manager. A few of them are installed by default, while many are not. Yum always notify you which plug-ins, if any, are loaded and active whenever you run any yum command.

In this short article, we will explain how to turn on or off and configure YUM package manager plug-ins in CentOS/RHEL distributions.

To see all active plug-ins, run a yum command on the terminal. From the output below, you can see that the fastestmirror plug-in is loaded.

# yum search nginx Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
...

Enabling YUM Plug-ins

To enable yum plug-ins, ensure that the directive plugins=1 (1 meaning on) exists under the [main] section in the /etc/yum.conf file, as shown below.

# vi /etc/yum.conf
Yum Configuration File
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1 installonly_limit=5

This is a general method of enabling yum plug-ins globally. As we will see later on, you can enable them individually in their receptive configuration files.

Disabling YUM Plug-ins

To disable yum plug-ins, simply change the value above to 0 (meaning off), which disables all plug-ins globally.

plugins=0 

At this stage, it is useful to note that:

  • Since a few plug-ins (such as product-id and subscription-manager) offer fundamental yum functionalities, it is not recommended to turn off all plug-ins especially globally.
  • Secondly, disabling plug-ins globally is allowed as an easy way out, and this implies that you can use this provision when investigating a likely problem with yum.
  • Configurations for various plug-ins are located in /etc/yum/pluginconf.d/.
  • Disabling plug-ins globally in /etc/yum.conf overrides settings in individual configuration files.
  • And you can also disable a single or all yum plug-ins when running yum, as described later on.

Installing and Configuring Extra YUM Plug-ins

You can view a list of all yum plug-ins and their descriptions using this command.

# yum search yum-plugin Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile * base: mirror.sov.uk.goscomb.net * epel: www.mirrorservice.org * extras: mirror.sov.uk.goscomb.net * updates: mirror.sov.uk.goscomb.net
========================================================================= N/S matched: yum-plugin ==========================================================================
PackageKit-yum-plugin.x86_64 : Tell PackageKit to check for updates when yum exits
fusioninventory-agent-yum-plugin.noarch : Ask FusionInventory agent to send an inventory when yum exits
kabi-yum-plugins.noarch : The CentOS Linux kernel ABI yum plugin
yum-plugin-aliases.noarch : Yum plugin to enable aliases filters
yum-plugin-auto-update-debug-info.noarch : Yum plugin to enable automatic updates to installed debuginfo packages
yum-plugin-changelog.noarch : Yum plugin for viewing package changelogs before/after updating
yum-plugin-fastestmirror.noarch : Yum plugin which chooses fastest repository from a mirrorlist
yum-plugin-filter-data.noarch : Yum plugin to list filter based on package data
yum-plugin-fs-snapshot.noarch : Yum plugin to automatically snapshot your filesystems during updates
yum-plugin-keys.noarch : Yum plugin to deal with signing keys
yum-plugin-list-data.noarch : Yum plugin to list aggregate package data
yum-plugin-local.noarch : Yum plugin to automatically manage a local repo. of downloaded packages
yum-plugin-merge-conf.noarch : Yum plugin to merge configuration changes when installing packages
yum-plugin-ovl.noarch : Yum plugin to work around overlayfs issues
yum-plugin-post-transaction-actions.noarch : Yum plugin to run arbitrary commands when certain pkgs are acted on
yum-plugin-priorities.noarch : plugin to give priorities to packages from different repos
yum-plugin-protectbase.noarch : Yum plugin to protect packages from certain repositories.
yum-plugin-ps.noarch : Yum plugin to look at processes, with respect to packages
yum-plugin-remove-with-leaves.noarch : Yum plugin to remove dependencies which are no longer used because of a removal
yum-plugin-rpm-warm-cache.noarch : Yum plugin to access the rpmdb files early to warm up access to the db
yum-plugin-show-leaves.noarch : Yum plugin which shows newly installed leaf packages
yum-plugin-tmprepo.noarch : Yum plugin to add temporary repositories
yum-plugin-tsflags.noarch : Yum plugin to add tsflags by a commandline option
yum-plugin-upgrade-helper.noarch : Yum plugin to help upgrades to the next distribution version
yum-plugin-verify.noarch : Yum plugin to add verify command, and options
yum-plugin-versionlock.noarch : Yum plugin to lock specified packages from being updated

To install a plug-in, use the same method for installing a package. For instance we will install the changelog plug-in which is used to display package changelogs before/after updating.

# yum install yum-plugin-changelog 

Once you have installed, changelog will be enabled by default, to confirm take look into its configuration file.

# vi /etc/yum/pluginconf.d/changelog.conf

Now you can view the changelog for a package (httpd in this case) like this.

# yum changelog httpd Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile * base: mirrors.linode.com * epel: mirror.freethought-internet.co.uk * extras: mirrors.linode.com * updates: mirrors.linode.com Listing all changelogs ==================== Installed Packages ====================
httpd-2.4.6-45.el7.centos.4.x86_64 installed
* Wed Apr 12 17:30:00 2017 CentOS Sources <[email protected]> - 2.4.6-45.el7.centos.4
- Remove index.html, add centos-noindex.tar.gz
- change vstring
- change symlink for poweredby.png
- update welcome.conf with proper aliases
...

Disable YUM Plug-ins in Command Line

As stated before, we can also turn off one or more plug-ins while running a yum command by using these two important options.

  • --noplugins – turns off all plug-ins
  • --disableplugin=plugin_name – disables a single plug-ins

You can disable all plug-ins as in this yum command.

# yum search --noplugins yum-plugin

The next command disables the plug-in, fastestmirror while installing httpd package.

# yum install --disableplugin=fastestmirror httpd Loaded plugins: changelog
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-45.el7.centos.4 will be updated
--> Processing Dependency: httpd = 2.4.6-45.el7.centos.4 for package: 1:mod_ssl-2.4.6-45.el7.centos.4.x86_64
---> Package httpd.x86_64 0:2.4.6-67.el7.centos.6 will be an update
...

That’s it for now! you may also like to read these following YUM related articles.

  1. How to Use ‘Yum History’ to Find Out Installed or Removed Packages Info
  2. How to Fix Yum Error: Database Disk Image is Malformed

In this guide, we showed how to activate, configure or deactivate YUM package manager plug-ins in CentOS/RHEL 7. Use the comment form below to ask any question or share your views about this article.

Similar Posts