Upgrade older Ubuntu versions

From CES IT Wiki
Jump to navigation Jump to search

How to upgrade older versions of Ubuntu

[edit | edit source]

Some of our Digital Ocean servers are running older versions of Ubuntu, some as old as 16.04. These cannot upgrade using the standard distros and need to have their sources file edited to look for the correct upgrade paths, which have been sent to an archive mirror path.

To run an upgrade of Ubuntu, type

sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove

If the upgrade fails due to not finding sources or not downloading the correct packages, try the fix below.

Steps to upgrade

[edit | edit source]
  1. Log in to Digital Ocean server via SSH
  2. Navigate to /etc/apt/
    1. Edit the sources.list file and remove (comment) any third part sources. Digital Ocean mirrors may need to be switched to Ubuntu repositories, but this requires testing.
      1. Heatshield was the problem in this case.
    2. Also edit any lists in /etc/apt/sources.list.d to see if other third party sources are blocking the update.
  3. Run the update again and see if it installs the correct packages.