diff --git a/pages/linux/dnf.md b/pages/linux/dnf.md index c291929ff9..b87a6f1f08 100644 --- a/pages/linux/dnf.md +++ b/pages/linux/dnf.md @@ -1,9 +1,8 @@ # dnf -> Package management utility for RHEL, Fedora, and CentOS (replaces yum). -> Some subcommands such as `group` and `config-manager` have their own usage documentation. +> Package manager for Fedora 41+ and RHEL 10. > For equivalent commands in other package managers, see . -> More information: . +> More information: . - Upgrade installed packages to the newest available versions: @@ -17,11 +16,11 @@ `dnf {{[if|info]}} {{package}}` -- Install a new package (use `--assumeyes` to confirm all prompts automatically): +- Install new packages (use `--assumeyes` to confirm all prompts automatically): `sudo dnf {{[in|install]}} {{package1 package2 ...}}` -- Remove a package: +- Remove packages: `sudo dnf {{[rm|remove]}} {{package1 package2 ...}}` @@ -31,8 +30,8 @@ - Find which packages provide a given command: -`dnf {{[wp|provides]}} {{command}}` +`dnf provides {{command}}` -- View all past operations: +- Clean cached data: -`dnf {{[hist|history]}}` +`sudo dnf clean {{all|dbcache|expire-cache|metadata|packages}}` diff --git a/pages/linux/dnf4.md b/pages/linux/dnf4.md new file mode 100644 index 0000000000..e63fc79837 --- /dev/null +++ b/pages/linux/dnf4.md @@ -0,0 +1,37 @@ +# dnf4 + +> Package manager for RHEL 8/9 and older Fedora versions (pre-41). +> For equivalent commands in other package managers, see . +> More information: . + +- Upgrade installed packages to the newest available versions: + +`sudo dnf4 {{[up|upgrade]}}` + +- Search packages via keywords: + +`dnf4 {{[se|search]}} {{keyword1 keyword2 ...}}` + +- Display details about a package: + +`dnf4 {{[if|info]}} {{package}}` + +- Install a new package (use `--assumeyes` to confirm all prompts automatically): + +`sudo dnf4 {{[in|install]}} {{package1 package2 ...}}` + +- Remove a package: + +`sudo dnf4 {{[rm|remove]}} {{package1 package2 ...}}` + +- List installed packages: + +`dnf4 {{[ls|list]}} --installed` + +- Find which packages provide a given command: + +`dnf4 {{[wp|provides]}} {{command}}` + +- View all past operations: + +`dnf4 {{[hist|history]}}` diff --git a/pages/linux/dnf5.md b/pages/linux/dnf5.md index 982e5027ec..d757dabfe1 100644 --- a/pages/linux/dnf5.md +++ b/pages/linux/dnf5.md @@ -1,38 +1,7 @@ # dnf5 -> Package management utility for RHEL, Fedora, and CentOS (it replaces dnf, which in turn replaced yum). -> DNF5 is a C++ rewrite of the DNF package manager featuring improved performance and a smaller size. -> For equivalent commands in other package managers, see . -> More information: . +> This command is an alias of `dnf`. -- Upgrade installed packages to the newest available versions: +- View documentation for the original command: -`sudo dnf5 upgrade` - -- Search packages via keywords: - -`dnf5 search {{keyword1 keyword2 ...}}` - -- Display details about a package: - -`dnf5 info {{package}}` - -- Install new packages (Note: Use `-y` to confirm all prompts automatically): - -`sudo dnf5 install {{package1 package2 ...}}` - -- Remove packages: - -`sudo dnf5 remove {{package1 package2 ...}}` - -- List installed packages: - -`dnf5 list --installed` - -- Find which packages provide a given command: - -`dnf5 provides {{command}}` - -- Remove or expire cached data: - -`sudo dnf5 clean all` +`tldr dnf`