I wanted to know how many kernel i have to free some space ( more than a year and half now on UM) and with all the updates saying “removing kernel” i wanted to know how many kernels i had ( so the software updater didn’t really work at this level see the list below)
I did a dpkg --list | grep linux-image
in terminal and the list below appears (command found here https://www.ostechnix.com/check-installed-linux-kernels/ )
rc linux-image-4.10.0-27-generic 4.10.0-27.30~16.04.2 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-28-generic 4.10.0-28.32~16.04.2 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-30-generic 4.10.0-30.34~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-32-generic 4.10.0-32.36~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-33-generic 4.10.0-33.37~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-35-generic 4.10.0-35.39~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-37-generic 4.10.0-37.41~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-38-generic 4.10.0-38.42~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-40-generic 4.10.0-40.44~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.10.0-42-generic 4.10.0-42.46~16.04.1 amd64 Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc linux-image-4.13.0-26-generic 4.13.0-26.29~16.04.2 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-32-generic 4.13.0-32.35~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-36-generic 4.13.0-36.40~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-37-generic 4.13.0-37.42~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-38-generic 4.13.0-38.43~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-39-generic 4.13.0-39.44~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-41-generic 4.13.0-41.46~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
rc linux-image-4.13.0-43-generic 4.13.0-43.48~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.13.0-45-generic 4.13.0-45.50~16.04.1 amd64 Linux kernel image for version 4.13.0 on 64 bit x86 SMP
ii linux-image-4.15.0-24-generic 4.15.0-24.26~16.04.1 amd64 Signed kernel image generic
ii linux-image-4.15.0-29-generic 4.15.0-29.31~16.04.1 amd64 Signed kernel image generic
rc linux-image-4.8.0-36-generic 4.8.0-36.36~16.04.1 amd64 Linux kernel image for version 4.8.0 on 64 bit x86 SMP
rc linux-image-4.8.0-58-generic 4.8.0-58.63~16.04.1 amd64 Linux kernel image for version 4.8.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-27-generic 4.10.0-27.30~16.04.2 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-28-generic 4.10.0-28.32~16.04.2 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-30-generic 4.10.0-30.34~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-32-generic 4.10.0-32.36~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-33-generic 4.10.0-33.37~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-35-generic 4.10.0-35.39~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-37-generic 4.10.0-37.41~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-38-generic 4.10.0-38.42~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-40-generic 4.10.0-40.44~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.10.0-42-generic 4.10.0-42.46~16.04.1 amd64 Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-26-generic 4.13.0-26.29~16.04.2 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-31-generic 4.13.0-31.34~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-32-generic 4.13.0-32.35~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-36-generic 4.13.0-36.40~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-37-generic 4.13.0-37.42~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-38-generic 4.13.0-38.43~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-39-generic 4.13.0-39.44~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-41-generic 4.13.0-41.46~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.13.0-43-generic 4.13.0-43.48~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
ii linux-image-extra-4.13.0-45-generic 4.13.0-45.50~16.04.1 amd64 Linux kernel extra modules for version 4.13.0 on 64 bit x86 SMP
rc linux-image-extra-4.8.0-36-generic 4.8.0-36.36~16.04.1 amd64 Linux kernel extra modules for version 4.8.0 on 64 bit x86 SMP
rc linux-image-extra-4.8.0-58-generic 4.8.0-58.63~16.04.1 amd64 Linux kernel extra modules for version 4.8.0 on 64 bit x86 SMP
ii linux-image-generic-hwe-16.04 4.15.0.29.51 amd64 Generic Linux kernel image
So i wanted to know wich kernel i am currently using and did a uname -r
and got
4.15.0-29-generic
Not knowing the differences between rc and ii and before doing something wrong…
I would like to remove all the possible kernels
But keep the last 3 or 4 as well as the one my system is using right now (just in case of problems and need to boot back on a previous kernel)
How i do that? (I am not a master of the terminal so something i can copy and past in it ? if possible)
Thanks for reading