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

Prerequisites

A software repository that contains software package updates is added before you update software applications. For more information about how to add a software repository, see Add a software repository.

Update software applications in CentOS

  1. Connect to a Linux instance. For more information, see Connection methods.
  2. Update software applications.
    • Run the following command to update a single software application:
      yum update <package> # Replace <package> with the software application that you want to update.
      For example, if you want to update Apache HTTP Server, run the following command:
      yum update httpd
    • Run the following command to update all software applications in the system.
      Notice If you run this command, the update process may update the kernel of the operating system and cause some issues. For example, the system may not start or certain software applications may be incompatible with the updated kernel. We recommend that you configure the system to skip kernel updates before you run this command.
      yum update

Update software applications in Ubuntu or Debian

  1. Connect to a Linux instance. For more information, see Connection methods.
  2. Run the following command to obtain a list of software package updates:
    apt-get update
  3. Update software applications.
    • Run the following command to update a software application:
      apt-get install <package> # Replace <package> with the software application that you want to update.
      For example, if you want to update Python, run the following command:
      apt-get install python
    • Run the following command to update all software applications in the system:
      Notice If you run this command, the update process may update the kernel of the operating system and cause some issues. For example, the system may not start or certain software applications may be incompatible with the updated kernel. We recommend that you configure the system to skip kernel updates before you run this command.
      apt-get upgrade

Update software applications in OpenSUSE

  1. Connect to a Linux instance. For more information, see Connection methods.
  2. Run the following command to obtain a list of software packages that need to be updated:
    zypper list-updates
  3. Update software applications.
    • Run the following command to update a software application:
      zypper update <package> # Replace <package> with the software application that you want to update.
      For example, if you want to update Python, run the following command:
      zypper update python
    • Run the following command to update all software applications in the system:
      Notice If you run this command, the update process may update the kernel of the operating system and cause some issues. For example, the system may not start or certain software applications may be incompatible with the updated kernel. We recommend that you configure the system to skip kernel updates before you run this command.
      zypper update

Result

After a software application is updated, you can check the software version. If the latest version number is displayed, the software application is updated.