$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }

Speed Up DNF on Fedora 40 with Caching & Fast Repos

August 13, 2025 | By the+gnu+linux+evangelist.

Optimize Fedora 40 DNF Performance with Metadata and Mirror Caching – Complete Guide

Learn how to speed up DNF on Fedora 40 by using metadata caching, preloading repositories, and the fastestmirror plugin for faster package installations.

Optimize DNF on Fedora with metadata caching and fast mirrors for quicker software installs.

These Fedora DNF tips save bandwidth, reduce delays, and make repeated installs faster and reliable.

Speed Up DNF on Fedora 40 with Caching & Fast Repos
  1. 1. Enable metadata caching

    By default, DNF refreshes repository metadata every time it runs. To speed it up, set metadata expiration in /etc/dnf/dnf.conf:

    sudo nano /etc/dnf/dnf.conf
    Add under [main]: metadata_expire=7d Finally, Ctrl+x to Save & Exit from nano Editor.

    This keeps repository metadata for 7 days, reducing repeated downloads and accelerating updates.

  2. 2. Preload repository metadata with makecache

    The dnf makecache command downloads and stores repository metadata locally, so subsequent dnf commands run faster:

    sudo dnf makecache

    This is particularly useful after adding new repositories or before running bulk installs.

  3. 3. Enable the fastestmirror plugin

    The fastestmirror plugin caches information about the fastest repository mirrors, reducing lookup time:

    sudo dnf install dnf-plugins-core
    sudo dnf config-manager --set-enabled fastestmirror

    After this, dnf will automatically pick the quickest mirror for downloads.

  4. For repeated installations, combining metadata caching with makecache and fastest mirror selection provides the best performance.