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
:
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:
[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:
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:
installonly_limit=3
d. Enable clean_requirements_on_remove
By enabling this parameter, DNF will clean up unnecessary packages when you remove other packages:
clean_requirements_on_remove=True
Result:
[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
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:
sudo dnf update
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!