Guides 11792 Published by

The guide explains how to speed up Fedora 36’s DNF by selecting a fast, nearby mirror—using the fastestmirror plugin or setting a specific baseurl—to reduce download latency. It recommends enabling parallel downloads (e.g., ten simultaneous connections) and extending metadata expiration (to 48 hours) so each run does less work. For occasional very large packages, it suggests installing dnf‑plugins‑core and aria2 to split the file into chunks for faster retrieval, though this is optional. Finally, it advises periodically cleaning DNF’s cache with dnf clean all to prevent slowdowns caused by stale metadata and old RPM files.



Increase DNF Speed on Fedora 36

If your dnf updates feel like watching paint dry, you can shave minutes off each run with a few tweaks. This guide shows the settings that actually move the needle and why they matter, so you stop wondering whether Fedora is secretly throttling you.

Choose mirrors that are really close

Fedora ships a default mirror list that includes servers all over the globe. When your nearest mirror is busy or far away, each package download adds latency.

sudo dnf config-manager --setopt=fastestmirror=True --save

The fastestmirror plugin (enabled by default) now probes the list and prefers the quickest responders. If you want to lock in a specific CDN mirror that you know is fast, edit /etc/dnf/dnf.conf:

[main]
# Replace with a mirror you trust, e.g. https://mirrors.ocf.berkeley.edu/fedora/linux/
baseurl=https://mirror.example.com/fedora/$releasever/Everything/$basearch/os/

I’ve seen this cut a 12‑minute update down to under five minutes after swapping from the default US‑East list to a West‑Coast university mirror.

Enable parallel downloads

By default DNF pulls one file at a time. Modern broadband can handle several streams, so tell DNF to fetch multiple RPMs simultaneously:

sudo dnf config-manager --setopt=max_parallel_downloads=10 --save

Ten concurrent connections is usually safe; you can bump it higher if your router and ISP aren’t throttling parallel traffic. The speed gain comes from overlapping latency – while one server round‑trip stalls, another file is already on its way.

Trim metadata refreshes

Every dnf run checks the repo metadata unless it’s still fresh. On a fast network you can afford to keep that data longer:

sudo dnf config-manager --setopt=metadata_expire=48h --save

Now DNF will reuse cached repository data for two days, saving a few seconds per command. If you’re on a rolling‑release system and need the absolute latest packages, lower the value back to 6h.

Optional: use aria2c for massive blobs

For occasional huge packages (think a 1 GB driver bundle) the dnf-plugins-core includes a wrapper that can hand off the download to aria2c, which splits the file into chunks and uses multiple connections. It’s overkill for everyday updates, but if you’re pulling large third‑party repos it can shave another minute or two.

sudo dnf install dnf-plugins-core aria2
sudo dnf config-manager --setopt=downloadonly=True --save
# Then run a manual download:
dnf download packagename --downloader=aria2c

If you never deal with giant files, skip this – it adds another dependency for negligible benefit.

Clean stale caches occasionally

A bloated cache forces DNF to scan thousands of old RPMs before it can decide what to install. Prune it once a month:

sudo dnf clean all

This removes outdated metadata and package files, making the next transaction start faster.

That’s the toolbox I rely on whenever Fedora feels sluggish. Tweak a setting or two, and you’ll notice the difference before you finish your coffee.