Essential DNF Commands for Linux With Examples

Essential DNF Commands for Linux With Examples

Essential DNF Commands for Linux With Examples

Linux operating systems like RedHat Linux use DNF or Dandified Yum as a package manager. It is used in RPM-based Linux systems and it is a successor of the Yum package manager.

Today, we will show you some of the useful and essential DNF commands with examples.

Essential DNF Commands for Linux With Examples

Linux DNF commands with examples:

1. How to Install packages using DNF

Run the following command to install packages in RPM-based Linux using the DNF command:

dnf install package_name

2. How to Check updates using the DNF command

Run the following command to check for updates for all installed packages in your system.

dnf check-update

3. How to list out all updates using the DNF command

To list out all the updates in your Linux system, run the following DNF command.

dnf list updates

4. How to install updates using the DNF command

Run the following command to install updates for your RPM-based Linux system.

dnf update

5. How to check the DNF versions of your Linux

The following command shows the DNF version included in your Linux.

dnf --version

6. How to list out the installed packages in Linux

The following DNF command gives you the list of installed and available packages.

dnf list

7. How to list out the available packages in Linux

dnf list available

6. How to list out the installed packages in Linux

Run the following command to show the list of installed packages in Linux.

dnf list installed

7. How to see the repository list using the DNF command.

dnf repolist

8. How to display the specific information using the DNF command.

Run the following command to display specific information about a package using the DNF command.

dnf info package_name

9. How to search for any package using the DNF command

Run the following command to search for any package using the DNF command.

dnf search package_name

10. How to Install a downloaded package that you downloaded manually

dnf localinstall yourpackagename.rpm

11. How to downgrade a package using the DNF command

Run the following command to downgrade a package using the DNF command.

dnf downgrade packagename

12. How to uninstall any application or package using DNF

Run the following command to remove or uninstall any application.

dnf remove applicationname

13. How To Clean up  Linux using DNF

Remove all the temporary files for enabled repos in your system.

dnf clean all
Removes all the repo metadata.
dnf clean metadata

Removes any cached packages.

dnf clean packages

Removes cache files for repo metadata.

dnf clean dbcache

Remove the local cookie files containing the packages’ download time signature.

dnf clean expire-cache
READ More Relevant Stuff:  GNOME 44 “Kuala Lumpur” Officially Released

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *