A distribution upgrade from Ubuntu 22.04 LTS (Jammy Jellyfish) to Ubuntu 24.04 LTS (Noble Numbat) brings modern kernel features, more current software stacks and five years of long-term support. An orderly in-place upgrade needs careful preparation, clean package sources and a proven backup.
The upgrade and recovery techniques taught here are essential for the safe operation of professional Linux server environments and follow standards of exams such as LPIC-1 or CompTIA Linux+.
💡 Note: Solid knowledge of the Linux command line and administrative rights (
sudo) for managing package sources and system services (systemctl) are assumed.
⚠️ Warning: Never run a major upgrade directly on production systems without prior tests. Use a test system or a virtual machine for preparation.
Fundamentals and version analysis
Understanding LTS versions
LTS stands for Long Term Support — Canonical's commitment to five years of standard security updates and bug fixes. For server and production environments only LTS releases should be used.
┌─────────────────────────────────────────────────────────────┐
│ Ubuntu LTS release cycle │
├─────────────────────────────────────────────────────────────┤
│ │
│ Ubuntu 22.04 LTS (Jammy) Ubuntu 24.04 LTS (Noble) │
│ ├── Release: April 2022 ├── Release: April 2024 │
│ └── Support: until 2027 └── Support: until 2029 │
│ │
│ Upgrade path: │
│ 22.04 LTS ─────────────────────────────────▶ 24.04 LTS │
│ (Hop 1: in-place) │
│ │
└─────────────────────────────────────────────────────────────┘
The most important changes between 22.04 and 24.04:
| Component | Ubuntu 22.04 LTS (Jammy) | Ubuntu 24.04 LTS (Noble) | Meaning for server operation |
|---|---|---|---|
| Linux kernel | 5.15 | 6.8 | Better hardware support, modern cgroup handling |
| Python | 3.10 | 3.12 | PEP 668 (externally-managed-environment for pip) |
| systemd | 249 | 255 | TPM2 integration, modern service watchdogs |
| OpenSSH | 8.9p1 | 9.6p1 | Modernized Kex algorithms, improved security |
| AppArmor | 3.0 | 4.0 | Improved unprivileged user namespace policies |
| Netplan | 0.104 | 1.0 | Status commands (netplan status), stabilized API |
💡 Ubuntu upgrade rule: Ubuntu always allows direct release upgrades only between consecutive LTS versions. A direct jump from 20.04 to 24.04 is not possible (the path is: 20.04 → 22.04 → 24.04).
System analysis before the upgrade
Before any change to package management you must capture the exact starting state of the system:
1. Confirm the current version:
lsb_release -a
The output should confirm Release: 22.04 and Codename: jammy.
2. Check hardware resources and disk space:
# CPU architecture and cores
lscpu | head -20
# RAM availability (at least 2 GB, recommended: 4 GB+)
free -h
# Disk space on root / (at least 20-25 GB free recommended)
df -h /
⚠️ Warning: Make sure the root partition (
/) and/boothave enough free space. A filesystem that fills up during package download or kernel unpacking leads to serious package inconsistencies.
Full data backup
Before the upgrade a verified backup of all configurations and user data is mandatory.
# Check important services and data paths
sudo mysql --version 2>/dev/null && echo "MySQL/MariaDB found"
sudo apache2 -v 2>/dev/null && echo "Apache found"
sudo nginx -v 2>/dev/null && echo "Nginx found"
Practical backup script:
The backup directory should ideally sit on a separate storage medium (e.g. NFS share, dedicated backup storage or USB drive) so that the space needed for the upgrade on the root partition (/) is not consumed.
#!/bin/bash
# backup_before_upgrade.sh
set -euo pipefail
BACKUP_DIR="/backup/ubuntu22_upgrade_$(date +%Y%m%d_%H%M%S)"
echo "=== Creating backup in: $BACKUP_DIR ==="
sudo mkdir -p "$BACKUP_DIR"
# Back up important system files
sudo cp -a /etc "$BACKUP_DIR/etc"
sudo cp -a /home "$BACKUP_DIR/home"
sudo cp -a /var/log/dpkg.log "$BACKUP_DIR/" 2>/dev/null || true
# Back up the list of installed packages
dpkg --get-selections > "$BACKUP_DIR/installed_packages.txt"
# Back up package-source status
sudo cp -a /etc/apt/sources.list* "$BACKUP_DIR/"
echo "Backup completed successfully. Size:"
sudo du -sh "$BACKUP_DIR"
Make the script executable and run it:
chmod +x backup_before_upgrade.sh
./backup_before_upgrade.sh
Package and system preparation
1. Fully update existing packages
Before the jump to the new version can be made, the existing 22.04 system must be on the absolute latest state.
# Update package lists
sudo apt update
# Install all updates including dependency adjustments
sudo apt full-upgrade -y
# Remove unused old libraries
sudo apt autoremove --purge -y
# Clean the package cache
sudo apt autoclean
What to do with held-back packages (packages kept back)?
# If packages are held back, install them explicitly:
sudo apt install --only-upgrade linux-generic linux-headers-generic
2. Check third-party sources and PPAs
Third-party package sources (PPAs) can lead to dependency conflicts during the upgrade. The upgrade manager usually disables third-party sources automatically, but it is cleaner to check problematic sources in advance:
# List third-party PPAs
grep -r "ppa" /etc/apt/sources.list.d/ || true
# Update Snap packages
snap list
sudo snap refresh
3. Configure the upgrade manager
The official tool do-release-upgrade steers the upgrade process.
# Install the update manager
sudo apt install update-manager-core -y
# Check the release-upgrade configuration
sudo nano /etc/update-manager/release-upgrades
Make sure the prompt line is set to lts:
[DEFAULT]
Prompt=lts
The upgrade process (22.04 → 24.04)
Starting the upgrade in a terminal session
If you run the upgrade over an SSH connection, you should definitely use screen or tmux. If the network connection drops, the upgrade continues undisturbed in the background.
# Start a screen session
screen -S noble-upgrade
# Initiate the release upgrade
sudo do-release-upgrade
💡 SSH emergency access: When run over SSH,
do-release-upgradeautomatically starts an additional SSH daemon on port1022. If port 1022 is blocked in your firewall, keep the ports open or work directly at the console.
┌─────────────────────────────────────────────────────────────┐
│ Release-upgrade sequence │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Check and preparation [████░░░░░░] 10% │
│ ├── Check system dependencies │
│ └── Set temporary package sources for 24.04 (noble) │
│ │
│ 2. Download packages [██████░░░░] 50% │
│ └── Download all archives to /var/cache/apt │
│ │
│ 3. Install and unpack [████████░░] 80% │
│ ├── Remove obsolete packages │
│ └── Unpack and configure the new stack │
│ │
│ 4. systemd restart [██████████] 100% │
│ └── Reboot into kernel 6.8 and Ubuntu 24.04 LTS │
│ │
└─────────────────────────────────────────────────────────────┘
Typical dialogs during the upgrade
- Prompt about changed configuration files:
- If a configuration file (e.g.
/etc/ssh/sshd_configor/etc/issue) was modified locally, the installer asks whether to take the package-maintainer version or keep the local file. - Recommendation: Check the diffs with
D. You usually keep your own adjustments in server services withN(Keep existing version).
- Remove obsolete packages:
- At the end of the installation process the wizard asks:
Remove obsolete packages?. - Recommendation: Confirm with
yto clean leftovers cleanly.
Completing the upgrade and rebooting the system
As soon as the message System upgrade is complete. Restart required appears, reboot the system:
# Perform the reboot
sudo reboot
Validation after the upgrade
After the reboot you log in again and check system health:
1. Version and kernel check
# Check the OS release
lsb_release -a
# Expected output:
# Description: Ubuntu 24.04 LTS (Noble Numbat)
# Release: 24.04
# Check the kernel version (should be 6.8.x)
uname -r
2. Check service status and log files
# Find failed systemd units
systemctl --failed
# Check critical kernel messages
sudo dmesg -l err,crit
# Check Netplan and network connections
sudo netplan status
ip addr show
3. Clean package management
# Ensure the latest state of the package database
sudo apt update
sudo apt autoremove --purge -y
sudo apt autoclean
Troubleshooting and emergency strategies
Scenario 1: Aborted upgrade / half-configured packages
If the upgrade was interrupted by a dropped connection or a power cut:
# Unlock package management and configure
sudo dpkg --configure -a
# Resolve broken dependencies
sudo apt install -f -y
# Check package status
sudo dpkg --audit
Scenario 2: SSH or network problems after reboot
If the network does not start automatically after the upgrade:
# Check Netplan configuration files
cat /etc/netplan/*.yaml
# Recompile and apply the configuration
sudo netplan generate
sudo netplan apply
Command Reference (Cheatsheet)
The most important operational commands for preparation, execution and verification of the upgrade at a glance:
| Phase / command | Function / explanation |
|---|---|
lsb_release -a && uname -r |
Checks the active Ubuntu and kernel version before or after the upgrade |
df -h / && free -h |
Checks free disk space and available memory |
sudo apt update && sudo apt full-upgrade -y |
Updates existing packages and fully resolves dependencies in advance |
sudo apt autoremove --purge -y && sudo apt autoclean |
Cleans orphaned old packages and empties the local package cache |
screen -S noble-upgrade |
Starts a detached terminal session to protect against SSH disconnects |
sudo do-release-upgrade |
Starts the official, interactive release-upgrade process |
systemctl --failed |
Lists services that failed after system start |
sudo netplan status |
Shows interfaces, addresses and routing status of modernized Netplan 1.0 |
sudo dpkg --configure -a |
Configures incompletely installed packages after an interrupted upgrade |
sudo apt install -f -y |
Repairs damaged package dependencies in an emergency |
Further Resources
The following internal documentation and references go deeper into safe operation and further upgrades:
| Resource / documentation | Description |
|---|---|
| Ubuntu upgrade: 24.04 to 26.04 LTS | The next logical step: migration to kernel 7.0, sudo-rs and APT 3.2 rollback |
| LPIC-1 series: Linux fundamentals | Solid knowledge of package management, shell workflows and Linux system architecture |
| Virtual machines for tests | Set up test environments for risk-free trial upgrades under Proxmox VE and KVM |
| Boot management and system start | GRUB configuration, initramfs and boot diagnosis on kernel problems |
| Ubuntu server environments | Overview of all guides for administration, hardening and operation of Linux servers |
Conclusion
An orderly release upgrade from Ubuntu 22.04 LTS to 24.04 LTS secures official maintenance and security support of the platform until 2029. Through the switch to Linux kernel 6.8, Netplan 1.0 and systemd 255 the system benefits from broader hardware support, modern cgroup handling and an improved security architecture. The success of such an upgrade rests on disciplined preparation: a verified backup outside the root partition, sufficient disk-space reserves and protecting the terminal session with screen minimize operational risk during the in-place upgrade.
💡 Practical tip for ongoing operation: After a successful upgrade, set up the
unattended-upgradespackage so that security-relevant bug fixes and patches are applied automatically in the background. Also note that Python 3.12 on 24.04 LTS strictly enforces PEP 668: globalpipinstallations are blocked, so system-near automation scripts must be maintained in separate virtual environments (python3 -m venv) or viapipx.
For systems that should always run on the latest LTS line, the next upgrade stage follows this milestone: in the follow-up article Ubuntu upgrade: from version 24.04 LTS to 26.04 LTS we carry out the next distribution jump — including cgroup v2-only migration, Rust-based sudo-rs and APT 3.2 rollback mechanisms.