Everything you need to know about the DNF package manager
Dandified Yum (DNF) is a powerful package management front-end for RPM-based Linux distributions.
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.
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
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.
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
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
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
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.
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
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
You should read it
- Many cheap Android smartphones are 'promotional' codes for users
- Drinking alcohol during adolescence can alter the brain, affecting later memory
- Want all year luck, and should not do these things on Tet
- Missed updating Chrome, how to return to the old interface?
- Use a battery drill or electric drill
- Netbooks sold twice as fast as last year
- 2 ways to help data center save electricity
- Life cycle of a Computer Deep: from Infection to Kill
- Chrome will support HTTP cache partitioning to prevent malicious attacks and unauthorized tracking
- How to Sync iCloud Apps on a Mac
- How to Recover Deleted Voicemail Messages on Android
- PEARSON function - The function returns the Pearson product moment correlation coefficient in Excel
Maybe you are interested
How to use the 'Meeting Room' feature on Facebook How to insert a video into PowerPoint and still open when transferred to another device Facebook application development allows anonymous users? Facebook removes Poke and Camera apps from the App Store Facebook is silently stealing user contacts 5 software to rename files in batch