Site icon New Generation Enterprise Linux

Stop waiting for dnf to hit every mirror in the country

Package Management (Apt/Dnf/Pacman Internals)

Stop waiting for dnf to hit every mirror in the country

🧩 The Challenge

Dealing with a slow repo mirror that dnf keeps trying to hit is a massive headache when you just want to install one small utility. I’ve spent way too much time staring at a terminal while it hangs on a dead or sluggish host.

💡 The Fix

Tell dnf to ignore the slowest mirrors and rank them by speed so it only bothers with the ones that actually respond quickly. This saves you from waiting on connections that are going nowhere.

dnf install <package_name> --setopt=fastestmirror=1

⚙️ Why It Works

By enabling the fastestmirror plugin, the package manager checks latency against the mirror list before pulling data, ensuring your traffic goes to the server that can actually get the bits to your machine.

🚀 Pro-Tip: If you’re on a server you manage frequently, just add fastestmirror=1 to your /etc/dnf/dnf.conf so you never have to think about it again.

Linux Tips & Tricks | © ngelinux.com | 9/24/2026

0 0 votes
Article Rating
Exit mobile version