How to Upgrade to Ubuntu 24.04 LTS
Comprehensive guide to upgrade to Ubuntu 24.04 LTS from 22.04 LTS safely using do-release-upgrade, with backup strategies, package audits, and rollback tips.

7 min read
Comprehensive guide to upgrade to Ubuntu 24.04 LTS from 22.04 LTS safely using do-release-upgrade, with backup strategies, package audits, and rollback tips.
- Prerequisites and Supported Releases
- Step 1: Planning and Pre-Upgrade Risk Mitigation
- Step 2: Updating Current Ubuntu 22.04 Packages
Operating system upgrades in enterprise environments represent significant administrative milestones. Upgrading across major LTS milestones refreshes core system software—including the Linux kernel, systemd init system, glibc C library, OpenSSL cryptography, and default compiler toolchains. When you upgrade to ubuntu 24.04, your server or workstation migrates from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS, bringing substantial performance and security enhancements.
Unlike ad-hoc package modifications or risky manual edits to /etc/apt/sources.list, Canonical provides the specialized do-release-upgrade tool. This utility manages package dependency calculations, temporarily disables unverified third-party repositories, establishes fallback SSH rescue sessions, and conducts graceful configuration file migrations.
This technical guide walks you through every phase of a safe upgrade lifecycle: executing pre-upgrade validation, cleaning up legacy packages, executing the release migration over SSH or local terminal, resolving interactive configuration prompts, and performing post-upgrade health checks.
Upgrading existing Linux infrastructure to a modern Long Term Support release ensures access to new kernel capabilities, enhanced cryptographic standards, and contemporary developer runtimes without requiring a destructive wipe. This step-by-step production guide details how to upgrade to Ubuntu 24.04 LTS (Noble Numbat) from Ubuntu 22.04 LTS (Jammy Jellyfish) across both server and desktop deployments using the official do-release-upgrade toolchain, pre-upgrade audits, and rollback safeguards.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 22.04 LTS to Ubuntu 24.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A fully updated system currently running Ubuntu 22.04 LTS (64-bit architecture).
- Direct console or out-of-band IPMI/VNC access in addition to standard SSH sessions.
- A minimum of 10 GB to 15 GB of free storage on the root filesystem (
/). - A validated full-system backup or VM hypervisor snapshot created immediately before upgrading.
Step 1: Planning and Pre-Upgrade Risk Mitigation
Before initiating any in-place operating system upgrade, complete three critical pre-flight preparations:
1. Full System Backup: Take a complete VM snapshot or disk image using tools like Clonezilla, Timeshift, or AWS/DigitalOcean snapshot managers. In-place upgrades modify thousands of system binaries; snapshots provide an instantaneous rollback mechanism.
2. Verify Disk Space: Upgrades download gigabytes of new Debian archives into /var/cache/apt/archives/. Check available storage on your root partition (df -h /). Ensure at least 10 GB to 15 GB of unallocated space.
3. Establish Redundant Access: If upgrading a remote headless server over SSH, ensure you have console access (such as Hetzner Robot KVM, Proxmox VNC, AWS Serial Console, or DigitalOcean Droplet Console) in case network configurations or firewall rules stall SSH.
# Check root filesystem available storage
df -h /
# Verify current operating system release version
lsb_release -a
Step 2: Updating Current Ubuntu 22.04 Packages
An upgrade must never be performed on a partially upgraded system. You must first bring all currently installed Ubuntu 22.04 packages to their latest available patch revisions.
Run the standard update and full-upgrade sequence, remove obsolete dependencies, and reboot the machine if a new kernel was applied.
# Update package database and upgrade all installed packages
sudo apt update
sudo apt full-upgrade -y
# Remove orphaned packages and clean package cache
sudo apt autoremove --purge -y
sudo apt clean
# Reboot the server to initialize the latest 22.04 kernel
sudo reboot
Step 3: Auditing Third-Party PPAs and Custom Repositories
Third-party Personal Package Archives (PPAs) and external repository files located in /etc/apt/sources.list.d/ are frequent causes of package dependency deadlocks during major upgrades.
The Ubuntu release upgrader automatically comments out third-party repositories during the process. However, to prevent broken dependencies, it is recommended to review and purge non-standard packages using ppa-purge or remove deprecated repositories manually.
# List active third-party repository lists
ls -la /etc/apt/sources.list.d/
# Identify foreign packages not sourced from official Ubuntu archives
apt-forktracer
Step 4: Configuring the Ubuntu Release Upgrader
The release upgrader is managed by the update-manager-core package. Ensure this package is installed and review /etc/update-manager/release-upgrades to confirm that the upgrade target is set to lts.
This setting ensures your system only upgrades to verified Long Term Support releases rather than interim six-month experimental releases.
# Install update-manager-core if not already present
sudo apt install -y update-manager-core
# Verify release prompt configuration
grep "^Prompt=" /etc/update-manager/release-upgrades
Step 5: Executing the do-release-upgrade Command
Once pre-upgrade requirements are satisfied, launch the official release upgrader. If you are executing this over an SSH connection, the upgrader will notify you that an additional emergency SSH daemon will be started on port 1022.
If your server has an active firewall like UFW, ensure port 1022 is permitted before proceeding. Then run the upgrade command.
# Open emergency fallback SSH port on UFW
sudo ufw allow 1022/tcp comment "Emergency upgrade SSH fallback"
# Run the official release upgrade tool
sudo do-release-upgrade
Step 6: Navigating Interactive Upgrade Prompts
During the upgrade calculation, the script displays the total number of packages to be upgraded, newly installed, and removed, along with the download size. Confirm with y to begin downloading packages.
Throughout the installation phase, you will encounter several interactive prompts:
1. Configuration File Conflicts: If a package update offers a new default configuration file (e.g., /etc/ssh/sshd_config or /etc/issue), choose keep your currently-installed version (N or keep) unless you explicitly intend to overwrite customized settings.
2. Restart Services Automatically: When prompted whether to restart services without asking during package upgrades, select Yes to avoid repeated manual prompts.
3. Remove Obsolete Packages: Toward the end of the installation, the tool asks whether to remove obsolete packages that no longer exist in Ubuntu 24.04. Type y to keep your system clean and eliminate unmaintained libraries.
Step 7: Finalizing the Upgrade and Rebooting
Once obsolete packages are removed, the upgrader informs you that the system upgrade is complete and a system restart is required. Type y and press Enter to initiate the final reboot.
Allow the server several minutes to shut down services, re-align storage mountpoints, and boot into Linux Kernel 6.8.
Step 8: Post-Upgrade Verification and Cleanup
After the system reboots, reconnect via SSH or log into your desktop console. Verify the newly installed release version, active kernel, and package status.
Finally, remove the emergency firewall rule and purge any lingering configuration artifacts.
# Verify the active Ubuntu release version
lsb_release -a
# Check active kernel version (should show 6.8.x)
uname -r
# Remove the emergency fallback SSH firewall rule
sudo ufw delete allow 1022/tcp
# Clean residual packages
sudo apt update && sudo apt autoremove --purge -y
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
Command 'do-release-upgrade' reports 'No new release found'
Resolution: Canonical enables direct point-to-point LTS upgrades upon the release of the first point release (e.g., 24.04.1 LTS). If you wish to upgrade prior to the official notification toggle, run sudo do-release-upgrade -d to check development channel flags.
Upgrade stalls on package download or returns network timeout
Resolution: Check /etc/apt/sources.list. If a specific regional mirror is unreachable, edit /etc/apt/sources.list to point to Canonical's primary archive mirrors at http://archive.ubuntu.com/ubuntu/.
SSH session disconnected unexpectedly during do-release-upgrade
Resolution: Connect to the emergency rescue SSH port using ssh -p 1022 user@server_ip. If screen or tmux was initialized by the upgrader, attach to the running session with screen -x to resume the interactive prompt.
Security Best Practices and Hardening
Always create a verifiable snapshot or full backup before running do-release-upgrade; in-place upgrades cannot be automatically rolled back if interrupted.
Review any modified configuration files such as /etc/ssh/sshd_config after upgrading to ensure security parameters like disabled root login remain active.
Never mix Debian and Ubuntu repositories during an upgrade, as this corrupts package dependency trees and can render the init system unbootable.
Close and remove any emergency firewall rules (e.g. port 1022) immediately after successfully verifying the post-upgrade environment.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install Ubuntu 24.04 LTS — Perform a clean bare-metal or virtual machine installation of Ubuntu 24.04.
- Initial Server Setup on Ubuntu 24.04 — Post-upgrade security hardening, firewall configuration, and user permissions.
- How to Install Docker on Ubuntu 24.04 — Re-verify container runtime engines and Docker services after major OS upgrades.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
/var/www/) remain intact. However, database daemon packages may upgrade their major versions, requiring service testing.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!