How to Install and Remove Packages with DNF in Fedora

DNF is a package manager for Linux distributions that are based on RPM. It is written in python and can be used as an alternative for Yum.

How To Install DNF

DNF source can be downloaded from GitHub repo. DNF is also available in Fedora's repositories as from Fedora 18. Therefore, you can install DNF from your terminal as follows:

$ sudo yum install dnf

Installing Packages With DNF

If you want to install a particular software, you can use DNF command just like you use Yum. For example to install geary email client you would run DNF as follows:

$ sudo dnf install geary

This is similar to what you would have done with Yum,

$ sudo yum install geary

dnf install

Remove Packages With DNF

DNF also gives you the ability to remove packages that you no longer need in your computer. Similar to the install command all you need to do is identify the package then run the command in your terminal:

$ sudo dnf erase geary

dnf erase

Update System With DNF

You can also use DNF to update your computer's packages to the most recent by running the command:

$ sudo dnf update

This will generate a list of all the packages that need to be downloaded and installed.

DNF List Command

To get a list of all the packages installed on your computer you can use the dnf list command. This command is used as follows:

$ sudo dnf list

You will however notice that the packages were listed too fast than you could see. To cater for this use the less command to allow you go through the list at your own pace.

$ sudo dnf list | less

dnf list

DNF Info Command

Peradventure you need more information about a package for example its size, version or brief description you can use the dnf info command as follows:

$ sudo dnf info

Using this command will list information about all the packages in the system and may take some time or prove too difficult for you to follow.
Just like in the list command you can combine this command with the less command to get all the information at your own pace.

$ sudo dnf info | less

dnf info
You may also need to get information quickly about a specific package without having necessarily to go through all the packages. To do this type the name of the package after the info command. For example:

$ sudo dnf info arduino

dnf info specific

DNF History Command

Another interesting feature of DNF is that it allows you to see a history of packages that have been installed, removed or updated. It also includes the date and time that happened in a human readable format, allowing you manage your system conveniently.
dnf history

Proxy Settings

If you are working behind a proxy server, then you have to edit the file /etc/dnf/dnf.conf so that DNF can know which proxy setting to use.
Open your favourite text editor and edit the file as follows:

$ sudo vi /etc/dnf/dnf.conf

After opening the file for editing, add the following line at the end of the file.


Save the file and now you will be able to use DNF if you working behind a proxy server.


DNF is great tool which you can use to achieve more than listed here. Lets wait and see if dnf can replace yum.Try it out today!

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.