To make
dnf update faster, edit your DNF configuration file to increase parallel downloads and enable the fastest mirror option.Steps to Speed Up DNF
- Open the Configuration File
- Run the following command in your terminal to edit the DNF configuration file:bash
sudo nano /etc/dnf/dnf.conf(Note: On newer DNF5 systems, you can also place settings inside/etc/dnf/libdnf5.conf.d/).
- Run the following command in your terminal to edit the DNF configuration file:
- Add Speed Optimization Settings
- Add or modify the following lines in the file:ini
max_parallel_downloads=20 fastestmirror=Truemax_parallel_downloads: Increases simultaneous downloads from the default of3up to10or20. fastestmirror: Tells DNF to automatically select the quickest mirror based on real-time ping data.
- Add or modify the following lines in the file:
- Save and Exit
- Press
Ctrl + OthenEnterto save the file, andCtrl + Xto exit.
- Press
- Additional Tips
- Disable weak dependencies: Add
install_weak_deps=Falseto prevent downloading unnecessary soft dependencies. - Use DNF5: If you are on a modern distribution (like recent Fedora releases), upgrading or using
dnf5natively provides a major performance boost over older DNF versions.
- Disable weak dependencies: Add
