Rocky Linux is a production-grade enterprise operating system based on Red Hat Enterprise Linux (RHEL) and has become popular in recent years as the choice of enterprise operating system. Since Rocky Linux is based on RHEL it comes with both RedHat Package Manager (rpm) and Dandified Yum (dnf) which are both available to use as package managers. dnf is the most popular and easy to use option for managing packages in RHEL based distributions and that is what we're going to recommend you use.
Updating and upgrading packages is really simple, first we want to install a package: Nginx - which we previously installed in another tutorial here. To upgrade all packages with dnf is as simple as:
dnf upgrade
This will automatically update and upgrade all packages on your Rocky Linux machine. If you want to skip the confirmation you can pass the -y flag like so:
dnf upgrade -y
And that is it! You have successfully updated and upgrade the packages on your Rocky Linux machine.