So, dnf4 will be replaced with dnf5 but not with python as the underlaying language, but using C++ as the underlying language. Python is well known for it’s easiness, but not as the performance when working on OS layer (some argue not, but majority of the code on C++ is faster, as it’s compiled, not scripted like python).
The question is, how we can try the dnf5? Based on the https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5#Scope docs, it is available via copr, so we can just enable it, and install it. The things that we need to know is, the history between dnf4/dnf3 isn’t shared with dnf5 (I also want to check the fastness of the history, sadly I can’t). So to enable the dnf5 package, we can enable the copr and install the dnf5 using this code
$ sudo dnf copr enable rpmsoftwaremanagement/dnf5-unstable
$ sudo dnf install dnf5
After that, we can try the dnf5 using
sudo dnf5 upgrade. There are no update command like in dnf3/dnf4, so we only have upgrade option. Based on my test, the upgrade/update metadata and repo resolving is faster about 1/3 of the dnf4 on my Thinkpad X220. I don’t expect that actually, but it really blazing fast. This also applied to
sudo dnf5 search some-package, it’s very fast, about half of the time that dnf4 use to search the package. Looking to this alpha package, seems the speed that’s promised on the docs, is delivered as it’s, and it will really be a nice thing to have when it land on Fedora 39. Beware that dnf5 still unstable or still on alpha stage, so don’t expect it don’t break (at least for me, it’s okay and not breaking for updating and installing package).
I hope this post helps for some folk who want to try dnf5 before the release of fedora 39, which is end of 2023. If you felt this post is useful, please share to your fellow fedora friends!