ObjectiveThe objective is to downgrade an Ubuntu system to its previous version.
RequirementsPrivileged access to your Ubuntu System as root or via
sudocommand is required.
DifficultyPossibly HARD ( not recommended )
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - given linux commands to be executed as a regular non-privileged user
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!
Downgrade sources.listFirst 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
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
Pin packagesSince 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/preferencesfile 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
Package: * Pin: release a=bionic Pin-Priority: 1001
Downgrade Ubuntu systemAll 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