For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /general/linux_server_management/update_centos_and_ubuntu_and_debian.md.

How to Update CentOS, AlmaLinux, Rocky Linux, Ubuntu and Debian Systems

Warning

When running any updates, do not interrupt the process. Doing so can cause your VPS to become unstable or unusable.

On CentOS

Update the system, then restart it to apply the changes:

yum update

Reboot the system:

reboot

On AlmaLinux or Rocky Linux

These distributions are similar to CentOS, and the yum package manager still works, but you can use the following command to update the system:

dnf update

Reboot the system:

reboot

On Ubuntu or Debian

Update the list of packages that can be updated:

apt-get update

Then install the updates and apply them by restarting the system:

apt-get dist-upgrade

Reboot the system:

reboot