Stop DNF from leaving your mirrors high and dry

Package Management (Apt/Dnf/Pacman Internals)

Stop DNF from leaving your mirrors high and dry

🧩 The Challenge

Dealing with a DNF update that hangs on a single dead mirror for ten minutes is a special kind of hell. I’ve wasted half my morning watching a progress bar sit at zero while the package manager ignores perfectly healthy alternatives.

💡 The Fix

Force DNF to skip the bad mirror and keep moving by lowering the timeout values in your main configuration. It cuts the wait time significantly before the engine decides to try the next source in the list.

echo "metadata_timer_sync=10" >> /etc/dnf/dnf.conf
echo "minrate=1000" >> /etc/dnf/dnf.conf
echo "timeout=5" >> /etc/dnf/dnf.conf

⚙️ Why It Works

Tweaking these parameters tells the resolver that if a connection is dragging or taking too long to shake hands, it needs to give up immediately rather than sitting there waiting for a timeout that takes forever. This forces the manager to cycle through your repository list much faster.

🚀 Pro-Tip: If you’re on a spotty connection, just run dnf makecache –refresh and be done with it.

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

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted