How to downgrade Ubuntu Linux system to its previous version

Objective

The objective is to downgrade an Ubuntu system to its previous version.

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

Possibly HARD ( not recommended )

Conventions

  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – given linux commands to be executed as a regular non-privileged user

Instructions

WARNING
Please be aware that downgrading the Ubuntu system is not recommended nor it is guaranteed to succeed. The chances of the successful downgrade are incredibly slim and highly dependent on the number of packages installed on your system. If you have upgraded your Ubuntu system and now facing some issues due to this upgrade, the chances are very high that the downgrade procedure only amplifies your problems further.

Most of the time it is safer and recommended to invest time to troubleshoot your current issues with the upgraded system or reinstall the entire system instead of hoping that the Ubuntu downgrade makes your problems go away. You have been warned!

The Ubuntu system downgrade procedure is relatively straightforward. The trouble only may arise during and after the system downgrade. In this guide, we will be downgrading Ubuntu 18.10 Cosmic Cuttlefish to Ubuntu 18.04 Bionic Beaver.



Downgrade sources.list

First step is to downgrade sources list file to the previous version. In our example we are downgrading from Ubuntu 18.10 Cosmic Cuttlefish to Ubuntu 18.04 Bionic Beaver hence we need to change every occurrence of codename cosmic to bionic. Yo can either use your favorite text editor to do this task or simply automate it by use of the sed command:

$ sudo sed -i 's/cosmic/bionic/g' /etc/apt/sources.list
Replace every occurance of the current system codename with the codename of targeted downgrade Ubuntu system

Replace every occurance of the current system codename with the codename of targeted downgrade Ubuntu system.

Pin packages

Since our current installation contains higher version packages then the one we aim to downgrade to we need to pin the apt package manager to previous version packages.

To do so edit the /etc/apt/preferences file and enter the following content while replacing the codename of the system codename you aim to downgrade to. In our case we are downgrading to bionic:

Package: *
Pin: release a=bionic
Pin-Priority: 1001

Downgrade Ubuntu system

All should be now ready to perform Ubuntu system downgrade. To do so execute the following commands:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade


Ubuntu downgrade does not come without WARNING attached.

Ubuntu downgrade does not come without WARNING attached.

The downgrade should not produce any errors. Warnings are expected and not fatal.

The downgrade should not produce any errors. Warnings are expected and not fatal.

Check your downgraded system for the current Ubuntu version.

Check your downgraded system for the current Ubuntu version.