Steps to Speed Up DNF




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
  1. 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/).
  2. Add Speed Optimization Settings
    • Add or modify the following lines in the file:
      ini
      max_parallel_downloads=20
      fastestmirror=True
      
      max_parallel_downloads: Increases simultaneous downloads from the default of 3 up to 10 or 20.
    • fastestmirror: Tells DNF to automatically select the quickest mirror based on real-time ping data.
  3. Save and Exit
    • Press Ctrl + O then Enter to save the file, and Ctrl + X to exit.
  4. Additional Tips
    • Disable weak dependencies: Add install_weak_deps=False to prevent downloading unnecessary soft dependencies.
    • Use DNF5: If you are on a modern distribution (like recent Fedora releases), upgrading or using dnf5 natively provides a major performance boost over older DNF versions.

*

Post a Comment (0)
Previous Post Next Post