DNF (Dandified YUM) is the next-generation package manager for RPM-based Linux distributions, designed to manage software packages in a more efficient and reliable way compared to its predecessor, YUM (Yellowdog Updater, Modified). Here’s a quick overview of DNF, its features, and some common commands.
Dependency Resolution: DNF resolves package dependencies automatically, ensuring that all required packages are installed or updated when a package is added or upgraded.
Performance: It provides faster performance and better memory management compared to YUM.
Modular Repository Support: DNF supports modules, allowing users to choose different versions of a package to install based on their needs.
Transactional Updates: DNF can rollback to the previous state if an update fails, ensuring system stability.
Rich Plugin Architecture: It supports plugins that extend its functionality.
Installing a Package:
dnf install package_name
Removing a Package:
dnf remove package_name
Updating Packages:
dnf update
Searching for a Package:
dnf search package_name
Listing Installed Packages:
dnf list installed
Cleaning Up Cache:
dnf clean all
Viewing Package Information:
dnf info package_name
To install a package, for example, curl
:
dnf install curl
To update all installed packages:
dnf update
To remove a package, say httpd
:
dnf remove httpd
To enable a specific module stream, for example, nodejs
:
dnf module enable nodejs:14
DNF provides a more robust and user-friendly approach to package management on RPM-based distributions like Fedora, CentOS, and Red Hat Enterprise Linux. Its improved performance and functionality make it a preferred choice for managing software packages in these systems.