2 min read

Upgrading to dnf5: A step-by-step guide for Fedora users

Fedora
dnf5
Cover image for Upgrading to dnf5: A step-by-step guide for Fedora users

Introduction

DNF5 is Fedora’s new, faster, and more powerful package manager. Although it is still in development and won’t be the default package manager until Fedora 39, you can install it now and start using it. This blog post will show you how to replace DNF with DNF5 on your Fedora system.


What’s the difference between dnf5 and dnf ?

DNF is an old, single-threaded package manager with much legacy code. It’s written in Python and is usually described as slow by users.
DNF5, on the other hand, is a complete rewrite of DNF written in C++. It’s multi-threaded, has a better user experience, should be easier to maintain, and is faster.


Why should I upgrade to dnf5?

Upgrading to DNF5 offers several benefits, including improved speed and efficiency. DNF5 is designed to be faster and more efficient than DNF, which can help speed up your system’s package installation and update process.
Additionally, as it will be the default package manager in Fedora 39, starting to use it now and reporting any bugs you encounter will help the developers fix them before the release.


How to upgrade to dnf5?

Step 1: Install dnf5

To install DNF5 from the unstable repository, run the following command:

dnf copr enable rpmsoftwaremanagement/dnf5-unstable ;
dnf install dnf5 dnf5-plugins

If you’re using sudo, use this command instead:

sudo dnf copr enable rpmsoftwaremanagement/dnf5-unstable ;
sudo dnf install dnf5 dnf5-plugins

Step 2: Create an alias for dnf5 (optional)

You can create an alias if you want to use DNF5 instead of DNF. Run the following command:

alias dnf="dnf5"

To make this alias permanent, add it to your ~/.bashrc file:

echo "alias dnf=\"dnf5\"" >> ~/.bashrc

Or add it to your ~/.zshrc file if you use zsh:

echo "alias dnf=\"dnf5\"" >> ~/.zshrc

Disclaimer

Remember that DNF5 is still in development and not ready for production use. It may contain bugs and should not be used on production systems. Use it at your own risk. I am not responsible for any damage caused by using DNF5.


Conclusion

DNF5 may still have some bugs, so it’s essential to experiment with it and keep this blog post up-to-date with the latest changes. This guide helped you upgrade to DNF5. If you have any questions or suggestions, feel free to contact me on Twitter or Discord.


References

Related articles

There are no related posts yet. 😢