
As a system administrator, it is your job to keep the system up to date with the latest packages to increase system stability and reduce security risks. If you haven�t configured your server to check for updates automatically, you�ll have to update them manually.
In this tutorial, we�ll learn how to keep Rocky Linux 8 Server up to date. So, let�s get started.
Manual Rocky Linux update using dnf
To check if there is any update available for your installed packages, navigate to the terminal and type the following command.
# sudo dnf check-update
![]()
If there is any update available, it will list down the updated available packages, update the single package, and use the following command.
# sudo dnf update httpd
![]()
To update the system development tools, use the following command.
# sudo dnf update "Development Tools"
![]()
To update all of your system packages at a time, execute the following command.
# sudo dnf update
![]()
It�s a good practice to keep your software packages updated with the latest version to minimize the security risk.
Automatic Rocky Linux updates with dnf
It�s a difficult task for a system admin to check system updates manually daily, when you have a large number of Infrastructure you won�t be able to check one by one. To set the system updates automatically, install the following package using the following command.
# sudo dnf install dnf-automatic
![]()
The Next step is to configure the automatic update, for this navigate to the dnf-automatic configuration file located at /etc/dnf/automatic.conf, and set the values for update.
# sudo vim /etc/dnf/automatic.conf
![]()
Set the download_updates and apply_updates parameters to YES, so every time the new updates come, it will install and notify through an email.

To set up an email notification, set the email_from and email_to parameters so it will notify you about the latest updates.

Conclusion
In this tutorial, we learned how to update a Rocky Linux 8 server with the latest software packages to reduce the security risk using automatically and manually.