Skip to content
SysTutorials
  • SysTutorialsExpand
    • Linux & Systems Administration Academy
    • Web3 & Crypto Academy
    • Programming Academy
    • Systems & Architecture Academy
  • Subscribe
  • Linux Manuals
  • Search
SysTutorials
Linux & Systems Administration

Disable FastestMirror Plugin in CentOS 7

ByEric Ma Posted onMar 24, 2018Apr 13, 2026 Updated onApr 13, 2026

The fastestmirror plugin automatically selects the fastest package mirror for your system. While useful, you might want to disable it if you’re experiencing slow mirror detection, prefer a specific mirror, or troubleshoot package manager issues.

The plugin is provided by yum-plugin-fastestmirror (on older EL7 systems) or as part of DNF’s core functionality (EL8+). Unlike older versions, modern systems don’t allow direct removal of this package due to dependency chains.

Check your system

First, identify what package manager your system uses:

cat /etc/os-release | grep VERSION_ID
  • EL7/CentOS 7: Uses yum with plugin architecture
  • EL8+/CentOS Stream 8+/Rocky/Alma: Uses DNF with modular plugin system
  • Fedora 38+: Uses DNF5

Disabling on EL7 (yum)

The fastestmirror plugin reads configuration from /etc/yum/pluginconf.d/fastestmirror.conf. View the current settings:

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

You’ll see output similar to:

[main]
enabled=1
verbose=0
always_print_best_host=true
socket_timeout=3
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15

To disable the plugin, change enabled=1 to enabled=0:

sudo sed -i 's/^enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf

Verify the change:

grep "^enabled" /etc/yum/pluginconf.d/fastestmirror.conf

Disabling on EL8+ (DNF)

Modern DNF versions handle mirror selection differently. If you want to disable fastest mirror detection, edit /etc/dnf/dnf.conf:

sudo vi /etc/dnf/dnf.conf

Add or modify:

fastestmirror=0

Alternatively, disable it temporarily for a single command:

sudo dnf --setopt=fastestmirror=0 update

Specifying a preferred mirror

If the issue is simply that fastestmirror picks a slow mirror, you can instead specify your preferred mirror directly. Edit your repo configuration:

sudo vi /etc/yum/repos.d/CentOS-Linux-BaseOS.repo

Replace the mirrorlist line with a direct baseurl:

# Comment out mirrorlist
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=baseos&infra=$infra

# Specify a direct mirror
baseurl=http://mirror.example.com/centos/$releasever/BaseOS/$basearch/os/

Use a geographically close or known-fast mirror from the CentOS mirror list.

Troubleshooting slow mirror detection

If fastestmirror itself is running slowly, check the age of the cached host file:

ls -la /var/cache/yum/timedhosts.txt

Remove stale cache to force re-detection:

sudo rm -f /var/cache/yum/timedhosts.txt
sudo yum clean all

For DNF:

sudo dnf clean all
sudo dnf makecache

Verify the plugin is disabled

Test that yum/dnf no longer uses mirror detection:

sudo yum check-update

or

sudo dnf check-update

You shouldn’t see messages about pinging or selecting mirrors. Run with verbose output to confirm:

sudo yum -v check-update 2>&1 | grep -i mirror

No output indicates the plugin is successfully disabled.

Troubleshooting Common Issues

When encountering problems on Linux systems, follow a systematic approach. Check system logs first using journalctl for systemd-based distributions. Verify service status with systemctl before attempting restarts. For network issues, use ip addr and ss -tulpn to diagnose connectivity problems.

Package management issues often stem from stale caches. Run dnf clean all on Fedora or apt clean on Ubuntu before retrying failed installations. If a package has unmet dependencies, try resolving them with dnf autoremove or apt autoremove.

Related System Commands

These commands are frequently used alongside the tools discussed in this article:

  • systemctl status service-name – Check if a service is running
  • journalctl -u service-name -f – Follow service logs in real time
  • rpm -qi package-name – Query installed package information
  • dnf history – View package transaction history
  • top or htop – Monitor system resource usage

Quick Verification

After applying the changes described above, verify that everything works as expected. Run the relevant commands to confirm the new configuration is active. Check system logs for any errors or warnings that might indicate problems. If something does not work as expected, review the steps carefully and consult the official documentation for your specific version.

Post Tags: #Bash#Cache#CentOS#Command#configuration#Editor#error#facebook#Fedora#How to#IE#Linux#OS#Plugin#RHEL#root#Software#System#systems#Tutorial#www#yum

Post navigation

Previous Previous
Limiting CPU Resources for Linux Users
NextContinue
Installing gfortran on CentOS 7

Tutorials

  • Systems & Architecture Academy
    • Advanced Systems Path
    • Security & Cryptography Path
  • Linux & Systems Administration Academy
    • Linux Essentials Path
    • Linux System Administration Path
  • Programming Academy
  • Web3 & Crypto Academy
  • AI Engineering Hub

Categories

  • AI Engineering (4)
  • Algorithms & Data Structures (14)
  • Code Optimization (8)
  • Databases & Storage (11)
  • Design Patterns (4)
  • Design Patterns & Architecture (18)
  • Development Best Practices (104)
  • Functional Programming (4)
  • Languages & Frameworks (97)
  • Linux & Systems Administration (727)
  • Linux Manuals (40,903)
    • Linux Manuals session 1 (13,267)
    • Linux Manuals session 2 (502)
    • Linux Manuals session 3 (27,134)
  • Linux System Configuration (32)
  • Object-Oriented Programming (4)
  • Programming Languages (131)
  • Scripting & Utilities (65)
  • Security & Encryption (16)
  • Software Architecture (3)
  • System Administration & Cloud (33)
  • Systems & Architecture (46)
  • Testing & DevOps (33)
  • Web Development (25)
  • Web3 & Crypto (1)

SysTutorials, Terms, Privacy

  • SysTutorials
    • Linux & Systems Administration Academy
    • Web3 & Crypto Academy
    • Programming Academy
    • Systems & Architecture Academy
  • Subscribe
  • Linux Manuals
  • Search