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 RHEL. 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 nginxget 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 nginxHow to view all the dependencies installed of nginx
dnf deplist nginx
Uninstall package use DNF
sudo dnf remove nginxDNF keeps a record of all transactions that involve installing or removing software packages
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-updateUpdate all installed software packages
sudo dnf updateYou can also update a specific package
sudo dnf update nginx
Post a Comment