Yum Download Mirror – Switching To The Fastest Mirror On CentOS/Fedora/RHEL


Have you ever found when using yum to update your system or install new software that the downloads come at incredibly slow speeds or extremely slow to respond?

There is a solution!

When you run into the issue of slow download speeds via yum there are a couple of things you can do to ensure yum will select a new mirror when attempting to grab the files.

First you will want to remove the yum fast mirror cache file:

rm /var/cache/yum/timedhosts.txt

Once you have removed the cache file you will want to again run yum and let is grab a new set of mirrors and select the fastest one for you.

In some cases you may once again end up with the same slow download mirror, in this case you will want to do the following:

Remove the yum cache file:

rm /var/cache/yum/timedhosts.txt

Once removed you will want to edit “fastestmirror.conf”

nano /etc/yum/pluginconf.d/fastestmirror.conf

Inside “fastestmirror.conf” you will want to locate “#exclude=.gov, facebook” and edit to look like the following:

exclude=.gov, facebook, mirror.slowmirror.com

We did two things in the edit:

  1. We remove the “#” which makes the line active.
  2. Added “, mirror.slowmirror.com”
    You will want to replace “mirror.slowmirror.com” with the actual mirror name/URL or it will not work!

Once done you want to close and save!

ctrl + x

Once saved, re-run yum and you should now get a completely new mirror. If you again run into a slow mirror you need only to repeat the steps above to remove that mirror, however if you are finding all mirrors to be slow, make sure you check the system is not actually have a network issue.

Originally posted 2016-01-08 02:59:11.



Please enter your comment!
Please enter your name here