Reading Time: < 1 minute
DNF (Dandified Yum) 101: Basic Package Manager Interaction
I. What is DNF (Dandified Yum)?
II. DNF Examples: Install, Remove, Upgrade, and Downgrade

Install a Package

Syntax:

dnf install <package>

Install a Single Package – Example:

dnf install mysql-server

Where mysql-server is the package name.

Install Multiple Packages – Example:

dnf install mysql-server mysql

Where mysql-server and mysql are the package names.

Upgrade / Update a Package

The update command has been deprecated in favor of upgrade.

Upgrade Every Package:

dnf upgrade

Upgrade a Single Package – Example:

dnf upgrade mysql-server

Where mysql-server is the package name.

Upgrade Multiple Packages – Example:

dnf upgrade mysql-server mysql

Where mysql-server and mysql are the package names.

Reinstall a Package

Syntax:

dnf reinstall <package>

Reinstall a Single Package – Example:

dnf reinstall mysql-server

Where mysql-server is the package name.

Reinstall Multiple Packages – Example:

dnf reinstall mysql-server mysql

Where mysql-server and mysql are the package names.

Downgrade a Package

Downgrades the specified package(s) to the highest of all known lower versions, if possible.

Syntax:

dnf downgrade <package>

Downgrade a Single Package – Example:

dnf downgrade mysql-server

Where mysql-server is the package name.

Downgrade Multiple Packages – Example:

dnf downgrade mysql-server mysql

Where mysql-server and mysql are the package names.

Remove a Package

By removing a specified package(s) from the server, you’ll also remove ANY packages dependent on the package(s) being removed.

Syntax:

dnf remove <package>

Remove a Single Package – Example:

dnf remove mysql-server

Where mysql-server is the package name.

Remove Multiple Packages – Example:

dnf remove mysql-server mysql

Where mysql-server and mysql are the package names.

List of All Available Commands

autoremove
check-update
clean
distro-sync
downgrade
group
help
history
info
install
list
makecache
provides
reinstall
remove
repolist
repository-packages
search
updateinfo
upgrade

About the Author: J. Mays

Have Some Questions?

Our Sales and Support teams are available 24 hours by phone or e-mail to assist.

1.800.580.4985
1.517.322.0434

Latest Articles

How Does Containerization Work?

Read Article

Microsoft Exchange Server Security Update

Read Article

How to Monitor Your Server in WHM

Read Article

How to Monitor Your Server in WHM

Read Article

How to Fix Typical WordPress Errors

Read Article