The software packages in Linux distributions are constantly updated to add new functions, bug fixes, and security updates. You can update software to the latest version based on business requirements. This topic describes how to update a specific software application or all applications on different Linux distributions.

Prerequisites

You have added the repository of software packages before you update the applications. For more information about adding software repositories, see Add software repositories.

Update software on CentOS

  1. Connect to a Linux instance. For more information, see Connect to a Linux instance.
  2. Update software applications.
    • To update a software application, run the following command.
      yum update <package> # Replace <package> with the software application you want to update.
      For example, to update Apache HTTP Server, run the following command:
      yum update httpd
    • To update all software applications in the system, run the following command.
      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 up or certain software applications may be incompatible with the updated kernel. Therefore, before you run this command, we recommend that you configure the system to skip kernel changes while applying updates.

      yum update

    After updating a software application, you can check its version. If it is the latest version, the software application has been updated.

Update software applications on Ubuntu or Debian

  1. Connect to a Linux instance. For more information, see Connect to a Linux instance.
  2. Run the following command to obtain a list of software packages that need to be updated.
    apt-get update
  3. Update software applications.
    • To update a software application, run the following command.
      apt-get install <package> # Replace <package> with the software application you want to update.
      For example, to update Python, run the following command:
      apt-get install python
    • To update all software applications in the system, run the following command.
      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 up or certain software applications may be incompatible with the updated kernel. Therefore, before you run this command, we recommend that you configure the system to skip kernel changes while applying updates.

      apt-get upgrade

    After updating a software application, you can check its version. If it is the latest version, the software application has been updated.

Update software on openSUSE

  1. Connect to a Linux instance. For more information, see Connect to a Linux instance.
  2. Run the following command to obtain a list of software packages that need to be updated.
    zypper list-updates
  3. Update software applications.
    • To update a software application, run the following command.
      zypper update <package> # Replace <package> with the software application you want to update.
      For example, to update Python, run the following command.
      zypper update python
    • To update all software applications in the system, run the following command.
      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 up or certain software applications may be incompatible with the updated kernel. Therefore, before you run this command, we recommend that you configure the system to skip kernel changes while applying updates.

      zypper update

    After updating a software application, you can check its version. If it is the latest version, the software application has been updated.