How to disable the fastestmirror yum plugin in CentOS 7 Linux?

How to disable the fastmirror yum plugin in CentOS 7 Linux?

The fastestmirror function of yum is provided by the package `yum-plugin-fastestmirror`. However, because `yum` depends on it, the `yum-plugin-fastestmirror` package can not be removed. If you try to remove it, `yum` will report failures like.

# yum remove yum-plugin-fastestmirror
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package yum-plugin-fastestmirror.noarch 0:1.1.31-50.el7 will be erased
--> Processing Dependency: yum-plugin-fastestmirror for package: yum-3.4.3-161.el7.centos.noarch
--> Running transaction check
---> Package yum.noarch 0:3.4.3-161.el7.centos will be erased
--> Processing Dependency: yum >= 3.4.3-143 for package: yum-utils-1.1.31-50.el7.noarch
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be erased
--> Finished Dependency Resolution
Error: Trying to remove "yum", which is protected

Don’t be panic yet. Although it can not be removed, it can be disabled. The fastedmirror plugin function can be controlled by the configuration file at


One example is as follows.

always_print_best_host = true
#  Relative paths are relative to the cachedir (and so works for users as well
# as root).
maxthreads=15, facebook,.de,.uk,.ie

The enabled option controls whether the plugin is enabled. To disable it, just replace the line




Then the fastestmirror plugin will be disabled.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.