Everything you need to know about the DNF package manager

 The following article will show you everything you need to know about the DNF package manager and the different DNF commands you can use to manage your packages.

Why use DNF package manager?

Many Linux distributions, such as Red Hat Enterprise Linux, CentOS Stream, and Fedora Linux have their own repositories that use RPM Package Manager (RPM) files to distribute programs, documentation, and libraries. It is a compressed archive format that can run scripts, verify the contents inside, and store package metadata.

One disadvantage of RPM is that it cannot install a package unless its prerequisites are present in the system. DNF bridges this gap by fetching the necessary dependencies for the package and resolving any software conflicts during installation.

Everything you need to know about the DNF package manager Picture 1

In addition, DNF also provides additional tools to install and manage packages in the system. It includes the ability to add external repositories, search for remote content, as well as support proper system recovery and cleanup.

Install the package using DNF

Installing packages is a basic function of every package manager. To install a remote package in DNF, run dnf install followed by the package name:

sudo dnf install nano

Everything you need to know about the DNF package manager Picture 2

The install command has a number of flags that allow changing its default behavior. For example, --setopt=install_weak_deps=False can be included to ignore 'Weak Dependencies' when installing a program.

Everything you need to know about the DNF package manager Picture 3

Fetch and install RPM files using DNF

DNF can also fetch empty .rpm packages from upstream repositories. This can be useful if you are setting up an offline machine and want to sideload RPM packages to that machine.

sudo dnf download emacs

You can even use the install command on the .rpm file to install it on your device. Doing this will provide the benefit of dependency resolution for non-repo packages.

sudo dnf install ~/your-package.rpm

Everything you need to know about the DNF package manager Picture 4

Reinstall existing packages

Furthermore, DNF may force reinstallation of programs in the current machine. This can be useful if you're having problems with an existing package and want to make sure you installed it correctly.

sudo dnf reinstall nano

Everything you need to know about the DNF package manager Picture 5

The reinstall command also has a number of optional flags to modify its behavior. For example, the --allowerasing flag will remove any potential dependency conflicts immediately upon reinstalling the program.

Process packet groups in DNF

Package grouping is a special DNF feature for installing programs around a theme or tool. This can be useful if you want to set up a consistent desktop build or manage a software collection.

To view the package groups available to the system, run the following command:

dnf group list

Everything you need to know about the DNF package manager Picture 6

The contents of a package group can be examined by running the info argument after the group command. For example, running dnf groups info Editors will print a short description of the group and the packages it will install.

Everything you need to know about the DNF package manager Picture 7

Install and remove package groups

The group command also handles its own installation process. Run the group command with the install argument , then provide the group name you want for your system:

sudo dnf group install Editors

Everything you need to know about the DNF package manager Picture 8

To remove an entire package group, replace the install argument with remove followed by the name of the group you want to remove:

sudo dnf group remove Editors

Everything you need to know about the DNF package manager Picture 9

5 ★ | 2 Vote

May be interested

  • All problems about using Task ManagerAll problems about using Task Manager
    task manager is one of the important tools for windows users. task manager has many uses. in this article, tipsmake.com will show you how to use the most basic task manager to take advantage of the benefits that this tool offers.
  • Package in PythonPackage in Python
    we will learn how to divide code into efficient, clear modules, using python packages. plus, the way to import and use your own package, or the package you download from somewhere into the python program.
  • How to check Internet package network FPT, VNPT, Viettel are usingHow to check Internet package network FPT, VNPT, Viettel are using
    regularly checking internet network packages fpt, vnpt, viettel are using the following ways to make it easier for you to monitor internet connection speed, and if you encounter any problems, you can contact immediately network operators to ensure that the line is always stable, without affecting your work or leisure time.
  • How to install Pip in UbuntuHow to install Pip in Ubuntu
    linux has a lot of package managers. ubuntu not only has apt but also many programming languages ​​that come with its own package manager. pip stands for python packages packages and allows you to easily install packages from python package index (pypi).
  • How to Install DEB FilesHow to Install DEB Files
    this wikihow teaches you how to install software from a deb package on your debian, ubuntu, or linux mint system. files ending with the extension .deb can be installed using the gdebi package installer, ubuntu software manager (ubuntu...
  • Check Exchange 2007 with System Center Operations Manager 2007 - Part 3Check Exchange 2007 with System Center Operations Manager 2007 - Part 3
    in this section we will introduce the detailed configuration of the exchange 2007 admin package for system center operations manager (opsmgr) 2007.
  • Exciting with World Cup MobiFone launched a great data packageExciting with World Cup MobiFone launched a great data package
    to help users do not miss any match, mobifone recently launched a super-heavy package to meet the demand of watching football of fans nationwide.
  • Neat Download Manager 1.3/1.8.0, download Neat Download Manager 1.3/1.8.0 hereNeat Download Manager 1.3/1.8.0, download Neat Download Manager 1.3/1.8.0 here
    neat download manager is a download manager that can be used with both mac os and windows. this application speeds up downloading files from the internet and helps you keep your download library up to date and organized.
  • How to register for Mobile Interphone package of MobifoneHow to register for Mobile Interphone package of Mobifone
    register for lien quan package mobifone will help you play lien quan anytime, anywhere, focus on fighting without having to worry about 3g / 4g, super fast speed and especially super cheap usage.
  • How to Convert Package Files in Ubuntu Using AlienHow to Convert Package Files in Ubuntu Using Alien
    if you want to install packages that you cannot directly install to your ubuntu system, you should use the alien package converter application. this program converts between the rpm, dpkg or tgz file formats. you can take package from...