All Products
Search
Document Center

Elastic Compute Service:Update software

Last Updated:Sep 11, 2023

Software packages on Linux distributions are constantly updated to add new features, fix bugs, and provide security updates. You can update software to the latest versions based on your business requirements. This topic describes how to update a specific piece of software or all software on different Linux distributions.

Prerequisites

Software repositories that contain software package updates are added. For more information, see Add a software repository.

Procedure

Update software on CentOS

  1. Connect to a CentOS instance.

    For more information, see Connect to a Linux instance by using a password or key.

  2. Update software on the instance.

    • Update a specific piece of software. For example, run the following command to update Apache:

      yum update httpd
      Note

      If you want to update other software, replace httpd in the preceding command with the name of the software that you want to update.

    • Update all software on the instance.

      Important

      The following command may update the system kernel, which causes issues, such as system startup failures or incompatibility between the kernel and software. We recommend that you configure the system kernel not to be updated and then run the command.

      yum update
  3. Check the version of software.

    <Software name> -V
    #Replace <Software name> with an actual software name.

    If the specified software is updated, the latest version number is displayed in the command output.

Update software on Ubuntu or Debian

  1. Connect to an Ubuntu or Debian instance.

    For more information, see Connect to a Linux instance by using a password or key.

  2. Obtain the list of software package updates.

    apt-get update
  3. Update software on the instance.

    • Update a specific piece of software. For example, run the following command to update Python:

      apt-get install python
      Note

      If you want to update other software, replace python in the preceding command with the name of the software that you want to update.

    • Update all software on the instance.

      Important

      The following command may update the system kernel, which causes issues, such as system startup failures or incompatibility between the kernel and software. We recommend that you configure the system kernel not to be updated and then run the command.

      apt-get upgrade
  4. Check the version of software.

    <Software name> -V
    #Replace <Software name> with an actual software name.

    If the specified software is updated, the latest version number is displayed in the command output.

Update software on openSUSE

  1. Connect to an openSUSE instance.

    For more information, see Connect to a Linux instance by using a password or key.

  2. Obtain the list of software package updates.

    zypper list-updates
  3. Update software on the instance.

    • Update a specific piece of software. For example, run the following command to update Python:

      zypper update Python
      Note

      If you want to update other software, replace python in the preceding command with the name of the software that you want to update.

    • Update all software on the instance.

      Important

      The following command may update the system kernel, which causes issues, such as system startup failures or incompatibility between the kernel and software. We recommend that you configure the system kernel not to be updated and then run the command.

      zypper update
  4. Check the version of software.

    <Software name> -V
    #Replace <Software name> with an actual software name.

    If the specified software is updated, the latest version number is displayed in the command output.