19

I upgraded my kernel to version 4.4.8 in an attempt to enable suspend/hybernate, but in turn it decreased the battery life. So i want to either

a. delete je 4.4.8 and revert to 4.4.0 kernel in my Ubuntu 16.04 LTS

b. leave the new kernel, but make the older (4.4.0) default booting kernel.

I'm a bit inexperienced with this, so I'd like steps and heads-ups :)

Also, should I just stick with the shipped kernel and await fixes and updates for my systems, or should I upgrade kernels as I see fit. What is the recommendation?

Output of dpkg -l | grep linux

ii  console-setup-linux                           1.108ubuntu15                                       all          Linux specific part of console-setup
ii  ladspa-sdk                                    1.13-2                                              amd64        sample tools for linux-audio-dev plugin architecture
ii  libselinux1:amd64                             2.4-3build2                                         amd64        SELinux runtime shared libraries
ii  libselinux1:i386                              2.4-3build2                                         i386         SELinux runtime shared libraries
ii  libv4l-0:amd64                                1.10.0-1                                            amd64        Collection of video4linux support libraries
ii  libv4lconvert0:amd64                          1.10.0-1                                            amd64        Video4linux frame format conversion library
ii  linux-base                                    4.0ubuntu1                                          all          Linux image base package
ii  linux-firmware                                1.157                                               all          Firmware for Linux kernel drivers
ii  linux-generic                                 4.4.0.21.22                                         **amd64        Complete Generic Linux kernel and headers
ii  linux-headers-4.4.0-21                        4.4.0-21.37                                         all          Header files related to Linux kernel version 4.4.0
ii  linux-headers-4.4.0-21-generic                4.4.0-21.37                                         amd64        Linux kernel headers for version 4.4.0 on 64 bit x86 SMP**
ii  linux-headers-4.4.8-040408                    4.4.8-040408.201604200335                           all          Header files related to Linux kernel version 4.4.8
ii  linux-headers-4.4.8-040408-generic            4.4.8-040408.201604200335                           amd64        Linux kernel headers for version 4.4.8 on 64 bit x86 SMP
ii  linux-headers-generic                         4.4.0.21.22                                         amd64        Generic Linux kernel headers
ii  linux-image-4.4.0-21-generic                  4.4.0-21.37                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.8-040408-generic              4.4.8-040408.201604200335                           amd64        Linux kernel image for version 4.4.8 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-21-generic            4.4.0-21.37                                         amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-generic                           4.4.0.21.22                                         amd64        Generic Linux kernel image
ii  linux-libc-dev:amd64                          4.4.0-21.37                                         amd64        Linux Kernel Headers for development
ii  linux-sound-base                              1.0.25+dfsg-0ubuntu5                                all          base package for ALSA and OSS sound systems
ii  linux-tools-4.4.0-21                          4.4.0-21.37                                         amd64        Linux kernel version specific tools for version 4.4.0-21
ii  linux-tools-4.4.0-21-generic                  4.4.0-21.37                                         amd64        Linux kernel version specific tools for version 4.4.0-21
ii  linux-tools-common                            4.4.0-21.37                                         all          Linux kernel version specific tools for version 4.4.0
ii  linux-tools-virtual                           4.4.0.21.22                                         amd64        This package will always depend on the latest minimal generic kernel tools.
ii  pptp-linux                                    1.8.0-1                                             amd64        Point-to-Point Tunneling Protocol (PPTP) Client
ii  syslinux                                      3:6.03+dfsg-11ubuntu1                               amd64        collection of bootloaders (DOS FAT and NTFS bootloader)
ii  syslinux-common                               3:6.03+dfsg-11ubuntu1                               all          collection of bootloaders (common)
ii  syslinux-legacy                               2:3.63+dfsg-2ubuntu8                                amd64        Bootloader for Linux/i386 using MS-DOS floppies
ii  util-linux                                    2.27.1-6ubuntu3                                     amd64        miscellaneous system utilities
20

Restart your computer, when your BIOS is through quickly press shift to open the GRUB menu, you might need a few tries to get the timing right.

There choose Advanced options and select to boot with the older kernel. Then you can safely uninstall everything that belongs to the newer kernel and be done with it:

sudo apt-get remove "linux-headers-4.4.8*"
sudo apt-get remove "linux-image-4.4.8*"
  • When trying just that, it tried to delete all previous kernels, including the one I wanted. But it did not tried to delete the last one. computer.login:~$ sudo apt-get remove "linux-headers-4.15.0-45*" [...] Les paquets suivants seront ENLEVÉS : linux-generic linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic linux-headers-generic 0 mis à jour, 0 nouvellement installés, 6 à enlever et 17 non mis à jour. Après cette opération, 180 Mo d'espace disque seront libérés. Souhaitez-vous continuer ? [O/n] n Annulation. – Autiwa Jan 30 '19 at 10:17
  • 1
    When using UEFI hit the escape key instead. – holmberd Jul 6 '19 at 23:17
  • As of 18.04 you can no longer user remove or purge to just delete the single kernel update, it deletes the generic image as well. – Benjamin R Oct 10 '19 at 16:49
  • @BenjaminR: Can you please link a resource for that information, because on my 18.04 this works wonderful. – Videonauth Oct 11 '19 at 0:59
  • @Videonauth doing remove or purge of linux-image-5.0.0-31-generic says linux-image-generic-hwe-18.04 will be removed as well as whatever kernel version I specified. Just checked it again myself. – Benjamin R Oct 11 '19 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.