How to Update a Vultr Cloud Server
Introduction
It is a best practice to update your server on a regular schedule for security and stability. Use this guide to keep your Vultr cloud server updated.
Before you begin, make a backup. Always make a backup before updating your system.
How to Update AlmaLinux, CentOS, Rocky Linux, and VzLinux
This section applies to:
- AlmaLinux
- CentOS 7 and later (both with and without SELinux enabled)
- Rocky Linux
- VzLinux
Procedure:
Update the package database. Use
yum check-update
to update the package database from the enabled repositories.$ sudo yum check-update
Use
yum update
to upgrade the packages.$ sudo yum update
Restart the server
$ sudo reboot
How to Update Arch Linux
Research the upgrade. Visit the Arch Linux homepage, to see if there have been any breaking changes to packages that you have installed recently. If there are, there may be manual intervention required after the upgrade.
Update the package databases for each of the repositories on your system.
$ sudo pacman --sync --refresh
Update the local database of PGP keys used by the package maintainers. This step is optional, but may prevent problems later on with the upgrade if the database has not been updated for some time.
$ sudo pacman --sync --needed archlinux-keyring
Upgrade all system packages. Be sure to note the upgraded packages and any output that requires your attention during the upgrade process.
$ sudo pacman --sync --sysupgrade
Reboot the system.
$ sudo reboot
(Optional) One Line Upgrade
If you wish to perform the entire upgrade with one command, you can combine the previous steps.
$ sudo pacman --sync --refresh --sysupgrade
Reboot the system after the upgrade completes.
How to Update Debian & Ubuntu
This section applies to:
- Ubuntu 16.04 and later
- Debian 9 "Stretch" and later
Procedure:
Update the package lists from the enabled repositories.
$ sudo apt update
List the upgradable packages. This step is optional. To view the upgradable packages before performing the upgrade, use the
apt list
command.$ sudo apt list --upgradable
Upgrade all the upgradeable packages.
$ sudo apt upgrade
Restart the server.
$ sudo reboot
One Line Upgrade
If you want to accept all the defaults and perform the upgrade without intervention, you can combine the commands with &&
and use the -y
flag to suppress prompts.
$ sudo apt update && sudo apt upgrade -y
Optional - Autoremove
Use apt to remove old packages and dependencies automatically.
$ sudo apt autoremove
How to Update Fedora
This secton applies to Fedora 31 or later, both with and without SELinux enabled.
Procedure:
Use
dnf check-update
to update the package database from the enabled repositories.$ sudo dnf check-update
Use
dnf upgrade
to upgrade the packages.$ sudo dnf upgrade
Restart the server.
$ sudo reboot