downgrade kernel version

install a specific linux version

October 10, 2023



Some cases require a different kernel version.

The following example simply assumes a running kernel more recent than 5.4.0.162-generic.


Check your current kernel version:

$ uname -r
# Possible output:
5.15.0-78-generic

Install a specific kernel (5.4.0.162):

$ apt-get install linux-headers-5.4.0-162-generic linux-image-5.4.0-162-generic

The kernel is installed but not used anywhere, so grub needs to know about it.

The goal is to boot into this kernel version.

List the grub menu entries, in order to get the entry for the kernel we are searching for:

$ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg
# OR or use 'grub-reboot':
$ grub-reboot <TAB><TAB>

Copy the necessary entry and configure it withn /etc/default/grub:

GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-162-generic'

Run update-grub2 in order to actually apply these changes. In case a Warning about old titles is displayed, you are encouraged to use a more recent title.

Apply the changes again:

$ update-grub2

In any case:

$ reboot

Check again:

$ uname -r
# The output shoud show:
5.4.0.162-generic