Skip to main content
Version: 8.5.X

Steps to Upgrade Ubuntu Version

Upgrading your Ubuntu OS ensures access to the latest features and security updates. This guide outlines the steps to upgrade from version 22 to 24, including pre-upgrade preparations, the upgrade process, and post-upgrade tasks to ensure a smooth and successful transition.

Prerequisites

  • Internet connectivity

  • 1022 port must be open. You can use the below command:

    sudo /sbin/iptables -I INPUT -p tcp --dport 1022 -j ACCEPT

    OR

    ufw allow 1022

  • Stop the main-server and analytics-server services.

  • Take the backup of the following components and copy them to another location:

    • ServiceOps Database
    • ServiceOps folder
    • ServiceOps FileDB folder
  • Verify the Ubuntu OS version before the upgrade

Applicable Version

This document applies to Ubuntu v22 only.

Process

To upgrade the Ubuntu v22 OS, follow the below steps:

  1. Check the current version of Ubuntu OS using the below command:

    cat /etc/os-release

  2. To upgrade, run the below command:

    sudo apt update

  3. Next, run the below command:

    sudo apt upgrade-y

Enter "y" to continue the process.

  1. Next, run the below command:

    sudo apt dist-upgrade –y

  2. Next, remove the unnecessary packages that are installed automatically by using the below command.

    sudo apt autoremove --purge -y

  3. Next, clean the local repository using the below command:

    sudo apt clean

  4. Install the update-manager-core package if not present using the below command:

    sudo apt install update-manager-core

  1. Verify that the “do-release-upgrade” tool is available in the system. If missing, install it using the below command:

    sudo apt install ubuntu-release-upgrader-core

note

Before running the above command, check whether the “/etc/update-manager/release-upgrades” file contains the “Prompt=lts” parameter using the below command:

cat /etc/update-manager/release-upgrades

If not, update it.

  9. Now, initiate the upgrade process using the below command:

sudo do-release-upgrade –d

  1. Next, enter "y" to continue the installation process.

  1. Next, enter "y" to continue.

  1. Press the "Enter" key.

  2. Enter "y" to continue.

  3. The Configuring keyboard configuration screen appears. Select the keyboard language as "English".

  1. Select the Keyboard Layout as “English (US)”.

  2. Configure openSSH server. Select the "Keep the local version currently installed" option.

  1. Once done, press “enter” and proceed. Enter "N" for no to remove the extra packages during the upgrade process.

  1. Enter "y" to restart the system.

  1. Once the Linux machine is up and running, check its current version using the below command:

    cat /etc/os-release

  1. Once the Ubuntu 24 is successfully updated, remove the extra packages from the server using the below command:

    sudo apt autoremove

note

After upgrading the Ubuntu version, allow approximately 15-20 minutes for system processes to synchronize and stabilize fully.