Upgrade Ubuntu‑22.04 to 24.04 in 5 Steps

Upgrade Ubuntu 22.04 to 24.04 LTS

Step‑by‑step guide: how to safely upgrade Ubuntu 22.04 LTS (“Jammy”) to Ubuntu 24.04 LTS (“Noble”) in 5 essential steps—backup, update, configure the upgrader, run the release upgrade, and verify clean‑up.

Table of Contents

🔈Introduction

Upgrading from Ubuntu 22.04 LTS (“Jammy Jellyfish”) to Ubuntu 24.04 LTS (“Noble Numbat”) is a major step forward: newer kernel, updated toolchains, long‑term support until 2029, and better security. 

Below is a clean, inclusive guide—five well‑defined steps—to carry out this upgrade safely. Whether you’re on desktop or server, local or remote, these instructions are designed to minimize risk and surprises.


🌐 Overview

WhatWhy It Matters
Backup + snapshotsIf something goes wrong, you can roll back without losing data.
Updating the current system fullyEnsures package dependencies are consistent before upgrading.
Installing or ensuring the upgrader tool is set correctlyWithout ubuntu‑release‑upgrader‑core or correct settings, the new release might not be offered.
Running the actual upgradeThe core transition—packages, kernel, configuration.
Verifying & post‑upgrade clean‑upsConfirm success, restore any disabled repos, clean up leftovers.

✅ Step 1: Prepare & Back Up

Before anything else:

  • Full data backup

    • For desktops: home directory, documents, configuration (/etc/, ~/.config/,etc.).
    • For servers: databases, web files, configuration, SSH keys.
    • IF on a VM or cloud provider, take a snapshot.
  • Ensure enough disk space

    • Recommended: at least 20 GB free, more if many third‑party applications or large logs.
    • You can check with:
				
					df -Ph
				
			
				
					$ df -Ph
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           795M  1.6M  793M   1% /run
/dev/vda3       147G   11G  128G   8% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/vda2       512M  6.1M  506M   2% /boot/efi
tmpfs           795M  140K  795M   1% /run/user/1001
				
			
  • Disable or review non‑Ubuntu / third‑party PPAs / repositories

    • These often cause conflicts during upgrades.
    • For each .list file in /etc/apt/sources.list.d/, either comment out or remove entries not maintained for 24.04.
  • Ensure SSH fallback if remote (for servers)

    • If upgrading over SSH, you risk losing connectivity if SSH restarts or fails. Some guides recommend adding port 1022 as a fallback.

✅ Step 2: Update Current Installation

Bring your Ubuntu 22.04 system fully up to date. Run these in a terminal:

				
					sudo apt update
				
			
				
					sudo apt upgrade -y
				
			
				
					sudo apt dist-upgrade -y
				
			
				
					sudo apt autoremove --purge -y
				
			
  • The dist-upgrade (or full-upgrade) ensures any held‑back packages or dependencies are resolved.
  • Reboot if a new kernel has been installed:
				
					sudo reboot
				
			

Check your current version to confirm you’re on 22.04, ideally the point‑release (e.g. 22.04.5 LTS):

				
					lsb_release -a
				
			
				
					cat /etc/os-release
				
			
				
					PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
				
			

✅ Step 3: Install / Check the Upgrade Tool & Configuration

  • Install the upgrader core
				
					sudo apt install ubuntu‑release‑upgrader‑core
				
			
  • Set the release‑upgrade prompt
    Open /etc/update-manager/release-upgrades and ensure there’s a line like:
				
					Prompt=lts
				
			

This ensures you only get offered LTS upgrades (from one long‑term support release to the next).

Upgrade Ubuntu 22.04 to 24.04 LTS: Distribution Upgrade

Photo by admingeek from Infotechys


✅ Step 4: Perform the Upgrade

Now you’ll run the actual upgrade. Choose the method depending on whether you can wait for the automatic offering or want to force it.

ScenarioCommand
Upgrade when automatic‑offer is availablesudo do-release-upgrade
Force upgrade immediately (if automatic is delayed)sudo do-release-upgrade -d

Follow all the interactive prompts:

  • When asked about existing configuration files (like sshd_config, journald.conf, etc.), accept default (“keep current”) if you had custom settings, or compare manually. 
  • If remote, ensure the fallback SSH port (1022) is active so you don’t lose access. 
  • Be patient: download/install can take a while based on your internet, CPU, disk speed.

After the upgrade completes, reboot your system:

				
					sudo reboot
				
			

✅ Step 5: Verify & Clean Up

After reboot, check success, re‑enable needed sources, and clean up.

🔹Verification commands

				
					lsb_release -a
				
			
				
					cat /etc/os-release
				
			
				
					uname -mrs
				
			

Expected to see something like:

				
					Distributor ID: Ubuntu
Description:    Ubuntu 24.04.x LTS
Release:        24.04
Codename:       noble
Kernel:         Linux 6.XX.x‑generic (or whatever newer kernel)
				
			

🔹Post‑upgrade tasks

  • Re‑enable any third‑party repositories you disabled; ensure their sources are compatible with noble.
  • Remove obsolete packages and clean cache:
				
					sudo apt autoremove --purge
sudo apt autoclean
sudo apt update
sudo apt upgrade
				
			
  • If you added fallback SSH port, remove or disable after confirming port 22 works. 
  • Check that all your services, daemons, database servers, web servers, etc. are running correctly.

🧩  Tips & Common Pitfalls

  • Timing of automatic upgrade availability:
    Automatic LTS‑to‑LTS upgrades from 22.04 may only be enabled after the first point release (e.g. 24.04.1). If you don’t see the offer, using ‑d can force it.
  • Back up config files: if you customized many .conf files, it helps to back up /etc/ beforehand.
  • Graphical interface issues: Some users report GUI/login issues after upgrade, especially on laptops with proprietary GPU drivers. If you land in a terminal, ensure ubuntu-desktop or your desktop package is intact.
  • Third‑party software compatibility: remember to check PPAs, drivers (NVIDIA/AMD), proprietary firmware.

📌 Summary in CLI Form

Here’s a compact sequence you might run in a terminal (local or remote), with fallback port support if needed:

				
					# Step 1: Backup & prep (done separately)

# Step 2: Update system
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove --purge -y
sudo reboot

# After reboot

# Step 3: Ensure upgrader tools and LTS prompt
sudo apt install ubuntu-release-upgrader-core -y
sudo sed -i 's/^Prompt=.*/Prompt=lts/' /etc/update-manager/release‑upgrades

# If remote: enable fallback SSH port
sudo ufw allow 1022/tcp
sudo sed -i '/^Port /a Port 1022' /etc/ssh/sshd_config
sudo systemctl restart ssh

# Step 4: Upgrade
sudo do-release-upgrade -d

# Reboot when done
sudo reboot

# Step 5: Verify & clean up
lsb_release -a
uname -mrs
sudo apt autoremove --purge -y
sudo apt autoclean
sudo apt update && sudo apt upgrade -y

# If fallback SSH port in use and port 22 is confirmed working:
sudo ufw delete allow 1022/tcp
				
			

🏁 Final Thoughts

Upgrading Ubuntu is a trade‑off: you get newer software, better hardware support, and extended security, but there’s always risk—especially with custom configurations or third‑party software. By following these five steps—backup, update, configure upgrader, perform upgrade, verify & clean—you maximize safety. For production systems, test first (on VM or staging), ensure you have rollback plans, and monitor carefully after upgrade.

Did you find this article helpful? Your feedback is invaluable to us! Feel free to share this post with those who may benefit, and let us know your thoughts in the comments section below.


📕 Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *