Setup the config file #
To make dnf (Dandified Yum) faster in Fedora, you can edit the [main] section in the file /etc/dnf/dnf.conf try the following optimization tips:
Enable Fastest Mirrors #
Enable fastest mirrors so that dnf will check all mirrors for the fastest one:
[main]
...
fastestmirror=TrueEnable DeltaRPM #
Delta RPM (DRPM) lets you install packages using binary difference between old and new packages.
First install Delta RPM if it is not already installed:
sudo dnf install deltarpmNow enable that in the dnf config file:
[main]
...
deltarpm=TrueOptimise Package Download #
Set the maximum number of parrallel downloads of packages in the dnf config file according to your internet connection speed.
[main]
...
max_parallel_downloads=10Optimise MetaData Refresh Interval #
Unlike package managers like apt, dnf periodically refreshes its metadata, which includes packages lists, their dependencies and other information. You can avoid excessive metadata refreshes by increasing the interval of metadata refresh to about 2 hours or more (7200 seconds) in the dnf config file:
[main]
...
metadata_timer_sync=7200Rebuild DNF Cache #
You can rebuild the DNF Cache and rebuilt it after configuring the dnf config file as mentioned above
First clean the DNF Cache:
sudo dnf clean allThen predownload the package headers:
sudo dnf makecache