Article

Table of Contents
Theme:
Was this article helpful?

2  out of  3 found this helpful

Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

How to Update a Vultr Cloud Server

Last Updated: Fri, Jul 15, 2022
Arch Best Practices CentOS Debian Fedora Ubuntu

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:

  1. Update the package database. Use yum check-update to update the package database from the enabled repositories.

    $ sudo yum check-update
    
  2. Use yum update to upgrade the packages.

    $ sudo yum update
    
  3. Restart the server

    $ sudo reboot
    

How to Update Arch Linux

  1. 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.

  2. Update the package databases for each of the repositories on your system.

    $ sudo pacman --sync --refresh
    
  3. 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
    
  4. 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
    
  5. 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:

  1. Update the package lists from the enabled repositories.

    $ sudo apt update
    
  2. 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
    
  3. Upgrade all the upgradeable packages.

    $ sudo apt upgrade
    
  4. 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:

  1. Use dnf check-update to update the package database from the enabled repositories.

    $ sudo dnf check-update
    
  2. Use dnf upgrade to upgrade the packages.

    $ sudo dnf upgrade
    
  3. Restart the server.

    $ sudo reboot
    

Want to contribute?

You could earn up to $600 by adding new articles.