7 DNF Command References
The following tables show examples of some common tasks that you can perform by using
the dnf
command to manage packages and package groups.
Table 7-1 DNF Commands
Command | Description |
---|---|
|
Lists all the enabled repositories. |
|
Lists all the packages that are available in all enabled repositories and all packages that are installed on the system. |
|
Lists all the packages that are installed on the system. |
|
Lists all the packages that are available to be installed in all enabled repositories. |
|
Searches the package descriptions for the specified string. |
|
Finds the name of the package to which the specified file or feature belongs, for example:
|
|
Displays detailed information about a package, for example:
|
|
List the files that are contained in a package and are installed when
the package is installed, for example:
|
|
Installs the specified package, including packages on which it depends, for example:
|
|
Checks whether updates exist for packages that are already installed on the system. |
|
Updates the specified package, including packages on which it depends, for example:
DNF also interprets the |
|
Updates all packages, including packages on which they depend. DNF also interprets the |
|
Removes the specified package. For example:
|
|
Removes all cached package downloads and cached headers that contain information about remote packages. Running this command can help clear problems that are a result of unfinished transactions or out-of-date headers. |
|
Displays help about |
|
Displays help about the specified
|
|
Runs the |
Table 7-2 DNF Group Commands
Command | Description |
---|---|
|
Lists Environment Groups, that contain many subgroups; and base groups of packages that are available for installation. To include hidden groups in the list and all the groups' IDs, add the
|
|
Displays detailed information about a group. If the group is a parent group, this command lists all subgroups that it contains, alternately the command lists all packages that are in the group. To include the groups' IDs, use the |
|
Installs all the packages in a group. |
|
Updates all the packages in a group. |
|
Removes all the packages in a group. |
Table 7-3 DNF Module Commands
Command Syntax | Description of Action | Additional Information |
---|---|---|
|
Installs the specified package. |
If a package is provided by a module stream, the
If the package is provided by a module stream that isn't marked as default or isn't enabled, that package isn't recognized until you manually enable the applicable module stream. |
|
Enables a module or stream. |
Use this command when you want to enable a module so that the packages are available to the system, but you don't necessarily want to install the module immediately. Note that some modules might not define default streams. In this case, you must explicitly specify the stream. If you explicitly specify a stream and an alternative stream is set as the default, the enabled stream overrides the default stream for later install requests. As an alternative, you can use |
Alternatively, you can use:
|
Installs a module. The |
If the module defines a default stream, or you have enabled a particular stream, you don't need to include stream and colon in the command syntax. Be aware that some modules don't define default streams. As an alternative, you can use |
Alternatively, you can use:
|
Installs a module by using a specific stream and default profiles. |
As an alternative, you can use |
Alternatively, you can use:
|
Installs a module by using a specific stream and profile. |
As an alternative, you can use |
|
Displays information about a module. |
|
|
Displays information about the packages that are installed by the profiles of a module using the default stream. |
|
|
Displays information about the packages that are installed by the profiles of a module using a specified stream. |
|
|
Lists all the available modules and displays the module name, stream, profiles, and a summary. Each module and stream is listed on a separate line. Profiles are indicated using comma separated values for each module and stream. Default values are indicated with the characters |
|
|
Lists the current status of a module. |
|
|
Displays information about which modules provide a specified package. If the package is only available outside of any modules, the command output is empty. |
|
|
Switch to a module stream. This command also changes the versions of installed packages to those versions provided by the new stream and removes packages from the old stream that are no longer available. The command also updates installed profiles if these are available in the new stream. |
This command is more encompassing than The command is also more encompassing than |
|
Removes the specified module. |
Removing an installed module removes all the packages and their dependencies that are installed by the profiles of the enabled module stream. The modules to be removed must have some profiles already installed. |
|
Removes all packages from the specified stream. |
Note that the command can remove critical packages from the system. |
|
Removes packages from the installed profile. |
|
|
Removes packages from all installed profiles within the specified stream. |
|
|
Resets a module to the initial state so it's no longer enabled or disabled. So, all installed profiles are removed. |
Note that the command doesn't remove packages from the specified module. |
|
Disables a module and all its streams. All related module streams become unavailable. So, all installed profiles are removed. |
Note that the command doesn't remove packages from the specified module. |