Yum, the CentOS package manager can be a real pain at times. I’ve seen Yum download packages at crawling speeds of 5kBps, that’s right.
To fix this is fairly straightforward, given you have the the yum-fastestmirror plugin installed, if not you need to install that first.
To fix slow downloads you’ll need to remove the speed test file the plugin created to check which the fastest mirror is. The problem is, the plugin doesn’t always refresh this list, you’ll need to delete it manually to get it to test mirrors again.
## CentOS 7 ## rm -f /var/cache/yum/x86_64/7/timedhosts rm -f /var/cache/yum/x86_64/7/timedhosts.txt ## CentOS 6 ## ## I didn't get a chance to look for these files on CentOS 6, but run the following to find and remove them find /var/cache/yum -name "timedhosts*"
That’s it, hit yum update or install a new package and it’ll rebuild it’s speed test file.