1

I tried to get some free space on my system partition. I found a lot of installed kernels and I deleted some. I have 2 questions:

  1. I still have kernel 5.4.0.100 low latency. Shouldn't the normal update procedure using the program discover (Kubuntu) update my kernel to newer versions automatically? Or do I have to do this manually?

  2. There are some kernels or parts of them that I can't get rid of:

$ dpkg -l | grep linux-'[g|i|m|h]'
ii  binutils-x86-64-linux-gnu                     2.34-6ubuntu1.3                             amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  linux-headers-5.11.0-46-generic               5.11.0-46.51~20.04.1                        amd64        Linux kernel headers for version 5.11.0 on 64 bit x86 SMP
ii  linux-headers-5.13.0-30-generic               5.13.0-30.33~20.04.1                        amd64        Linux kernel headers for version 5.13.0 on 64 bit x86 SMP
ii  linux-headers-5.4.0-100                       5.4.0-100.113                               all          Header files related to Linux kernel version 5.4.0
ii  linux-headers-5.4.0-100-lowlatency            5.4.0-100.113                               amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii  linux-headers-lowlatency                      5.4.0.100.104                               amd64        lowlatency Linux kernel headers
ii  linux-hwe-5.11-headers-5.11.0-46              5.11.0-46.51~20.04.1                        all          Header files related to Linux kernel version 5.11.0
ii  linux-hwe-5.13-headers-5.13.0-30              5.13.0-30.33~20.04.1                        all          Header files related to Linux kernel version 5.13.0
ii  linux-image-5.4.0-100-lowlatency              5.4.0-100.113                               amd64        Signed kernel image lowlatency
ii  linux-image-lowlatency                        5.4.0.100.104                               amd64        lowlatency Linux kernel image
ii  linux-modules-5.4.0-100-lowlatency            5.4.0-100.113                               amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP

How can I delete them?

EDIT: After following Someone's answer, it seems to be all clean:

$ dpkg -l | grep linux-'[g|i|m|h]'
ii  binutils-x86-64-linux-gnu                     2.34-6ubuntu1.3                             amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  linux-headers-5.13.0-30-lowlatency            5.13.0-30.33~20.04.1                        amd64        Linux kernel headers for version 5.13.0 on 64 bit x86 SMP
ii  linux-headers-lowlatency-hwe-20.04            5.13.0.30.33~20.04.17                       amd64        lowlatency Linux kernel headers
ii  linux-hwe-5.13-headers-5.13.0-30              5.13.0-30.33~20.04.1                        all          Header files related to Linux kernel version 5.13.0
ii  linux-image-5.13.0-30-lowlatency              5.13.0-30.33~20.04.1                        amd64        Signed kernel image lowlatency
ii  linux-image-lowlatency-hwe-20.04              5.13.0.30.33~20.04.17                       amd64        lowlatency Linux kernel image
ii  linux-modules-5.13.0-30-lowlatency            5.13.0-30.33~20.04.1                        amd64        Linux kernel extra modules for version 5.13.0 on 64 bit x86 SMP

Thank you all for your help.

Error404
  • 7,440
sebigbos
  • 19
  • 1
  • 6

1 Answers1

2

You are having an old and unsupported kernel ie. 5.11.0-46. Moreover, you have removed some of the packages of every kernel, but didn't remove the kernels properly; and you also don't have the latest kernel for Ubuntu 20.04 ie. 5.13.

I recommend running the following command to remove all the old and unsupported kernels:

dpkg -l | egrep "linux-(signed|modules|image|headers)" | grep -v $(uname -r | cut -d - -f 1) | awk {'print $2'} | xargs sudo apt purge -y

Then update and install the latest HWE kernel (the kernel 5.11 suggests you use the HWE stack):

sudo apt update && sudo apt install --install-recommends linux-generic-hwe-20.04 --reinstall && sudo apt upgrade -y

If you want to free up space in /boot then see How do I free up more space in /boot?

Error404
  • 7,440
  • thanks for looking. I tried the first command und it seems to execute well but I still have some rests of 5.11. I tried the second command also but I interrupted it because it starts to install 5.13.0.30 but I need a lowlatency kernel, so I think I need 5.13.0.30-lowlatency; I'm musician... – sebigbos Feb 25 '22 at 14:55
  • got it. lowlatency instead of generic does the job – sebigbos Feb 25 '22 at 14:59
  • the installation didn't go through. I get 30 oder 40 lines like these "Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu" – sebigbos Feb 25 '22 at 15:02
  • 1
    Missing firmwares only matter if you have that exact hardware. See here – Doug Smythies Feb 25 '22 at 15:09
  • 1
    @sebigbos Run wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/amdgpu && cd amdgpu && sudo cp -r * /lib/firmware/amdgpu/ also edit your question to add the output of dpkg -l | egrep "linux-(signed|modules|image|headers)" | grep -v $(uname -r | cut -d - -f 1) | awk {'print $2'} | xargs sudo apt purge -y – Error404 Feb 25 '22 at 15:25