Manage Packages on RPM Linux Distros With DNF

 In this tutorial, How to install and remove packages on RPM-based Linux Distros with DNF.

DNF is the default package manager on Fedora and RHELRHEL. when you run yum command on new Linux distros, it is actually using DNF in the background. Verify command below

ls -l /usr/bin/yum

The output the yum command is a symbolic link to dnf.

Search package with DNF

dnf search nginx
get more infomation abount a certain package
dnf info nginx

List all packages installed your system.
dnf list installed

Installing package use DNF

sudo dnf install nginx
How to view all the dependencies installed of nginx
dnf deplist nginx

Uninstall package use DNF

sudo dnf remove nginx
DNF keeps a record of all transactions that involve installing or removing software packages
dnf history

Removing Unused Dependencies


To remove such dependencies

sudo dnf autoremove

remove data downloaded along with installed packages.
sudo dnf clean packages

clean up your software package cache and other metadata that installed packages
sudo dnf clean metadata

Reinstalling Software Packages

sudo dnf reinstall nginx

Updating Packages With DNF


To fetch the latest software package updates from remote repositories

sudo dnf check-update
Update all installed software packages
sudo dnf update
You can also update a specific package
sudo dnf update nginx

Conclusion

Using DNF to manage packages on RPM-based Linux distributions such as Fedora and RHEL provides a powerful and efficient way to handle software installation, updates, and removal. DNF simplifies these tasks with commands for searching, installing, updating, and removing packages, as well as cleaning up dependencies and cache. Understanding and utilizing DNF commands can significantly enhance your system management capabilities, ensuring your Linux environment remains secure and up-to-date. thank you for reading the huuphan.com page!

Comments

Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6