Appendix A. DNF commands list
In the following sections, examine DNF commands for listing, installing, and removing content in Red Hat Enterprise Linux 9.
A.1. Commands for listing content in RHEL 9
The following are the commonly used DNF commands for finding content and its details in Red Hat Enterprise Linux 9:
Command | Description |
---|---|
| Search for a package by using term related to the package. |
| Search for enabled DNF repositories for a selected package and its version. |
| List information about all installed and available packages. |
| List all packages installed on your system. |
| List all packages in all enabled repositories that are available to install. |
| List all enabled repositories on your system. |
| List all disabled repositories on your system. |
| List both enabled and disabled repositories. |
| List additional information about the repositories. |
| Display details of an available package. |
| Display details of a package installed on your system. |
| List modules and their current status. |
| Display details of a module. |
| Display the current status of a module. |
| Display packages associated with available profiles of a selected module. |
| Display packages associated with available profiles of a module by using a specified stream. |
| Determine which modules, streams, and profiles provide a package. Note that if the package is available outside any modules, the output of this command is empty. |
| View the number of installed and available groups. |
| List all installed and available groups. |
| List mandatory and optional packages included in a particular group. |
A.2. Commands for installing content in RHEL 9
The following are the commonly used DNF commands for installing content in Red Hat Enterprise Linux 9:
Command | Description |
---|---|
| Install a package.
If the package is provided by a module stream, |
| Install multiple packages and their dependencies simultaneously. |
| Specify the architecture of the package by appending it to the package name when installing packages on a multilib system (AMD64, Intel 64 machine). |
| Install a binary by using the path to the binary as an argument. |
| Install a previously downloaded package from a local directory. |
| Install a remote package by using a package URL. |
| Enable a module by using a specific stream. Note that running this command does not install any RPM packages. |
| Install a default profile from a specific module stream. Note that running this command also enables the specified stream. |
| Install a selected profile by using a specific stream. |
| Install a package group by a group name. |
| Install a package group by the groupID. |
A.3. Commands for removing content in RHEL 9
The following are the commonly used DNF commands for removing content in Red Hat Enterprise Linux 9:
Command | Description |
---|---|
| Remove a particular package and all dependent packages. |
| Remove multiple packages and their unused dependencies simultaneously. |
| Remove a package group by the group name. |
| Remove a package group by the groupID. |
| Remove all packages from the specified stream. Note that running this command can remove critical packages from your system. |
| Remove packages from an installed profile. |
| Remove packages from all installed profiles within the specified stream. |
| Reset a module to the initial state. Note that running this command does not remove packages from the specified module. |
| Disable a module and all its streams. Note that running this command does not remove packages from the specified module. |