How to make DNF to use fastest mirror for system update in Fedora?

0/5 No votes

Report this app


Many of you have faced this problem of slow system update or package downloading speed on your Fedora system even when your internet is working perfectly fine.

This happens due to the source or mirror it uses to update or download packages. The factors that affect a mirror are its physical location from the user and the total number of users using it at a time.

Today in this article I will discuss how to make the dnf package manager to use the fastest mirror for system updates in Fedora Linux.

What is a Mirror?

In computing, a mirror is a package source that is copied to multiple servers located in different physical locations. Each location of these servers is accessed through different URLs.

The optimal server is often a server with the closest physical location to the user’s system. The following image shows the different mirrors for downloading Fedora Linux.

fedora mirrors

Configure Fedora to use the fastest mirror

To make Fedora, to find and use the fastest mirror on your system you need to edit /etc/dnf/dnf.conf file.

Use the following command to edit this configuration file –

sudo nano /etc/dnf/dnf.conf

You should see the following –


Add the following line at the bottom of this file –


dnf fastmirror

Press Ctrl+s to save and then Ctrl+x to exit from the editor.

Run the given command to clean partially downloaded update files if any from your system –

sudo dnf clean all

Finally, use the given command to update your system-

sudo dnf update -y

Now when the above command is executed first it will find the fastest mirror which is available for downloading packages on a system and then it will start the actual download.


Making dnf to use the fastest mirror can help in overcoming the issue of slow updates or downloading of packages on your Fedora system.

I hope this article is useful to you. Now if you have a query or feedback then write us in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *