Upgrading Ubuntu 18.04 To 20.04

Upgrading Ubuntu 18.04 To 20.04

Reading time1 min
#Linux#OpenSource#Tech#Ubuntu#UbuntuUpgrade#LTS

Mastering the Seamless Upgrade from Ubuntu 18.04 to 20.04: A Practical How-To Guide

Upgrading your server or workstation operating system might sound daunting, especially when you’ve heard plenty of upgrade horror stories — unexpected downtime, broken dependencies, or worse, data loss. But with Ubuntu, a polished and well-supported LTS (Long-Term Support) release cycle makes upgrading smoother than you think.

If you’re still running Ubuntu 18.04, it’s time to consider upgrading to Ubuntu 20.04 to reap critical security patches, updated software stacks, and notable performance improvements. This step is key to maintaining a reliable and secure IT environment while keeping your applications running at peak efficiency.


Why Upgrade from Ubuntu 18.04 to 20.04?

Before diving into the how-to, here’s why this upgrade matters:

  • Up-to-date security patches: Ubuntu 20.04 continues to receive updates until April 2025, whereas support for Ubuntu 18.04 ends in April 2023 for standard support.
  • Modern software versions: You’ll get newer versions of the Linux kernel, systemd, Python, PHP, OpenSSL, and popular applications.
  • Improved hardware support: Better compatibility with current hardware and drivers.
  • Performance improvements: Enhanced boot speed and resource management.
  • New features: Includes updated GNOME desktop environment (if using GUI), improved ZFS support, and updated Snap package system.

Forget upgrade horror stories: this guide breaks down the upgrade process into clear, actionable steps that prioritize data integrity and system stability — so you can confidently modernize without downtime or headaches.


Pre-Upgrade Checklist

Before you begin:

  1. Backup Everything!
    Use rsync, tar, or backup solutions like Timeshift (for desktops) or duplicity (for servers) to back up your important files and configurations.
    sudo rsync -avh --progress /home/username /path/to/backup/location/
    
  2. Update Existing Packages
    Bring your current system up-to-date before starting the upgrade:
    sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y
    
  3. Remove Unnecessary Packages
    Clear out obsolete dependencies:
    sudo apt autoremove --purge -y
    
  4. Check Disk Space
    Make sure you have enough space (at least 2GB free is recommended):
    df -h /
    

Step-by-Step Upgrade Process

Step 1: Install Update Manager Core

Ubuntu’s do-release-upgrade tool manages the OS releases upgrade process.

sudo apt install update-manager-core

Step 2: Configure Release Upgrades

Check that the system is set to prompt for normal LTS upgrades:

sudo nano /etc/update-manager/release-upgrades

Make sure it reads:

Prompt=lts

Save and exit (Ctrl+O, Enter, Ctrl+X).

Step 3: Start the Upgrade

Initiate the release upgrade:

sudo do-release-upgrade

If no new release is found immediately (due to Ubuntu's staged rollout), try forcing it:

sudo do-release-upgrade -d

Note: The -d flag tells the tool to look for development releases but since Ubuntu 20.04 is stable now, it should detect that as latest LTS.

Step 4: Follow On-Screen Instructions Carefully

The tool will prompt about discontinued packages or services that need manual attention.

  • When asked whether to keep or replace configuration files during the upgrade, choose carefully:
    • If you customized extensively in /etc, review each item.
    • Usually selecting “keep local version currently installed” will avoid accidental overwrites.

Step 5: Finalize Upgrade and Reboot

After the upgrade completes successfully:

sudo reboot

Once rebooted, confirm your Ubuntu version:

lsb_release -a
# Or:
cat /etc/os-release

# Example output:
# DISTRIB_RELEASE=20.04
# VERSION="20.04 LTS (Focal Fossa)"

Post-Upgrade Recommendations

  • Verify Services Are Running Properly: E.g., web servers (apache2, nginx), database services (mysql, postgres).
  • Review Logs for Errors:
journalctl -p err -b
  • Update Package Index & Clean Up Leftovers:
sudo apt update && sudo apt autoremove --purge -y && sudo apt clean
  • Test Critical Applications: Make sure all business or personal tools work well on the new OS.

Troubleshooting Tips

  • If do-release-upgrade fails midway due to network problems, abort safely (Ctrl+C), fix network issues, then run sudo dpkg --configure -a before retrying.
  • Broken packages? Use:
sudo apt install -f

to fix dependencies.

  • For stubborn old PPAs causing conflicts, disable them temporarily in /etc/apt/sources.list.d/.

Wrapping Up

Upgrading from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS doesn’t have to be scary or downtime-heavy if done step-by-step with preparation first. This guide walks through backing up data safely through to verifying completion.

By modernizing your Ubuntu system now, you stay supported with security patches and enjoy a smoother experience with new software — a win-win for any user or sysadmin!

Got questions about specific package concerns or server setups? Drop a comment below!


Happy upgrading! 🚀