How to Update a Rocky Linux Server
This guide explains how to update the packages on your Rocky Linux server, how to tell whether a reboot is needed and how to have updates installed automatically. Upgrading to a new major version (for example from 8 to 9) is not covered here.
Which version are you using?
cat /etc/os-release
The PRETTY_NAME line shows the version, for example Rocky Linux 9.8.
Support status of the versions
| Version | Security updates until | Status (November 2026) |
|---|---|---|
| Rocky Linux 10 | 31 May 2035 | Supported |
| Rocky Linux 9 | 31 May 2032 | Supported |
| Rocky Linux 8 | 31 May 2029 | Security updates only (since 31 May 2024) |
Only the latest minor release of each major version is supported (for example 8.10, not 8.9). dnf upgrade moves your server to the latest minor release on its own, so installing updates regularly matters. Security advisories are published with RLSA codes.
Before you start
- Run the commands as root or with
sudo. - Take a backup. Backups are the customer's responsibility; for your server you can use our backup services or take a copy of the whole server with the System Copy add-on.
- Choose a quiet time. Some services restart during the update, and a kernel update needs a reboot.
- If you lose your SSH connection, you can still reach a VDS server from the console in the client area: Using the Console on a VDS Server.
Installing updates
- See which updates are available:
dnf check-update - Install them:
The command shows what it will do and asks for confirmation; press y and Enter. (dnf upgradednf updateis an older name for the same command.)
If you only want security updates, you can use:
dnf upgrade --security
To see the pending security advisories: dnf updateinfo list --security. We still recommend installing all updates regularly.
Is a reboot needed?
A new kernel or core libraries (such as glibc or systemd) only take effect after a reboot. Check with:
dnf needs-restarting -r
The command says whether a reboot is needed. If it is not found, install it with dnf install dnf-plugins-core. To list the services still using old files: dnf needs-restarting -s. To reboot the server: reboot. You can also use Restart in the client area.
Installing updates automatically
dnf-automatic downloads and installs updates on a schedule. Install it:
dnf install dnf-automatic
Set these lines in the [commands] section of /etc/dnf/automatic.conf:
[commands]
upgrade_type = security
apply_updates = yes
upgrade_type = security installs only security updates; write default instead to install all updates.
Turn on the timer:
systemctl enable --now dnf-automatic.timer
By default the server is not rebooted. If you want, reboot = when-needed in the same section reboots it when an update needs it.
Note: there have been reports of security advisory data reaching the Rocky Linux repositories late or incomplete. Running dnf upgrade regularly is therefore safer than installing only security updates with --security.
Troubleshooting
- "Waiting for process with pid … to finish": another dnf process is running (often the automatic update). Wait for it to finish.
- "Cannot download repomd.xml" or "Failed to download metadata": check the server's internet and DNS settings, then try again with
dnf clean allanddnf upgrade. - The server does not come back after a reboot: open the console in the client area and check the screen (Using the Console on a VDS Server). The boot menu usually still has the previous kernel. If you cannot solve it, you can open a support ticket from your client area.
The information in this guide is taken from official documentation: Rocky Linux releases, Rocky Linux errata, dnf command reference, dnf needs-restarting, dnf-automatic.