How to Speed Up Updates in Fedora by Modifying dnf.conf

Fedora is a popular Linux distribution known for its rapid updates. However, the update process can sometimes feel slow. In this article, we will discuss how to modify the dnf.conf configuration file to speed up updates in Fedora. By following these steps, you can enhance package download speeds and make your system more efficient.

What Is dnf.conf?

dnf.conf is the configuration file for DNF (Dandified YUM), the package manager used by Fedora. This file allows users to customize various settings related to package downloading and installation.

Steps to Modify dnf.conf

1. Access the Configuration File

To start editing the dnf.conf file, you need root access. Open a terminal and use your favorite text editor. Here’s how to open the file using nano:

bash
sudo nano /etc/dnf/dnf.conf

2. Modify Key Settings

Once the file is open, add or modify the following parameters to speed up updates:

a. Enable fastestmirror

This parameter allows DNF to choose the fastest mirror (server) for downloading packages. Add the following line:

nano
[main]
fastestmirror=True

b. Adjust max_parallel_downloads

By setting max_parallel_downloads, you can download multiple packages simultaneously. For example, to allow up to 10 parallel downloads:

nano
max_parallel_downloads=10

c. Limit installonly_limit

By default, DNF retains multiple versions of kernel packages. If you want to limit the number of versions saved, add:

nano
installonly_limit=3

d. Enable clean_requirements_on_remove

By enabling this parameter, DNF will clean up unnecessary packages when you remove other packages:

nano
clean_requirements_on_remove=True

Result:

nano
[main]
gpgcheck=True
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
fastestmirror=True
max_parallel_downloads=10
clean_requirements_on_remove=True
defaultyes=True
dnf.conf
It will look like this

3. Save Your Changes

After making the changes, save the file and exit the editor. If you are using nano, press CTRL + O to save and CTRL + X to exit.

4. Perform the Update

After modifying the configuration, run the system update with the following command:

bash
sudo dnf update
test download

I tested it and got speeds of 4Mbps – 6 Mbps, this is cool

Additional Tips to Speed Up Updates

  • Use a Local Repository: If you have multiple Fedora systems, consider creating a local repository using createrepo. This can reduce download times by pulling packages from a local source.
  • Schedule Updates: To avoid peak times during updates, schedule updates for off-hours.

Conclusion

Modifying the settings in dnf.conf is an effective way to speed up the update process in Fedora. By enabling fastestmirror, adjusting the number of parallel downloads, and cleaning up unnecessary packages, you can enhance your system’s performance. Try these steps and enjoy a more responsive Fedora experience.

By following this guide, you will be able to optimize your system updates easily. Happy updating!

Tirsasaki
Tirsasaki

I’m a Linux enthusiast who loves sharing knowledge about technology and open-source software. As a writer for Conslinux.com, I create easy-to-follow tutorials, tips for troubleshooting, and helpful guides to make your computing experience better. I enjoy exploring different Linux distributions and am excited to share my insights with the community!

Articles: 215

Leave a Reply

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