Why are there so many kernels on my system?

Below is the list of the many installed images on my system. I do not know why there are so many. Why doesn't the autopurge argument take care of this mess? Please give me a reason why this is happening. Have I installed or enabled some settings without knowing? Thanks.

ii  linux-image-5.11.0-25-generic                 5.11.0-25.27~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-27-generic                 5.11.0-27.29~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-34-generic                 5.11.0-34.36~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-36-generic                 5.11.0-36.40~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-37-generic                 5.11.0-37.41~20.04.2                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-38-generic                 5.11.0-38.42~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-40-generic                 5.11.0-40.44~20.04.2                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-41-generic                 5.11.0-41.45~20.04.1                        amd64        Signed kernel image generic
ii  linux-image-5.11.0-43-generic                 5.11.0-43.47~20.04.2                        amd64        Signed kernel image generic
rc  linux-image-5.4.0-66-generic                  5.4.0-66.74                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-66-lowlatency               5.4.0-66.74                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-67-generic                  5.4.0-67.75                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-67-lowlatency               5.4.0-67.75                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-70-generic                  5.4.0-70.78                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-70-lowlatency               5.4.0-70.78                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-71-generic                  5.4.0-71.79                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-71-lowlatency               5.4.0-71.79                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-72-generic                  5.4.0-72.80                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-72-lowlatency               5.4.0-72.80                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-73-generic                  5.4.0-73.82                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-73-lowlatency               5.4.0-73.82                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-74-generic                  5.4.0-74.83                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-74-lowlatency               5.4.0-74.83                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-77-generic                  5.4.0-77.86                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-77-lowlatency               5.4.0-77.86                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-80-generic                  5.4.0-80.90                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-80-lowlatency               5.4.0-80.90                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.4.0-81-generic                  5.4.0-81.91                                 amd64        Signed kernel image generic
rc  linux-image-5.4.0-81-lowlatency               5.4.0-81.91                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.8.0-50-generic                  5.8.0-50.56~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-53-generic                  5.8.0-53.60~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-55-generic                  5.8.0-55.62~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-59-generic                  5.8.0-59.66~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-63-generic                  5.8.0-63.71~20.04.1                         amd64        Signed kernel image generic
ii  linux-image-generic-hwe-20.04* 

The reason is pretty simple: You can actually boot an older version, if you experience any kind of hiccups, regressions. While Ubuntu hides the boot menu by default, you can press a key to see it before you actually boot, and then you can pick a different version.

If you type: sudo apt-get autoremove, your system will let you remove all these packages at once. If you use a newer Ubuntu (such as 20.04 LTS), you can also use sudo apt autoremove, they are the same practically the same thing.

You can check out the /etc/apt/apt.conf.d/01autoremove-kernels file where apt stores the relevant lines. Don't touch the file though, it's auto-generated after each new kernel install.

Ps.: Only the ii packages are actually installed, as heynnema stated in comments.


some of them already deinstalled

rc  linux-image-5.4.0-81-lowlatency               5.4.0-81.91                                 amd64        Signed kernel image lowlatency
rc  linux-image-5.8.0-50-generic                  5.8.0-50.56~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-53-generic                  5.8.0-53.60~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-55-generic                  5.8.0-55.62~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-59-generic                  5.8.0-59.66~20.04.1                         amd64        Signed kernel image generic
rc  linux-image-5.8.0-63-generic                  5.8.0-63.71~20.04.1  

but having remaining configs on your system.

explanation

to get rid of remaining configs

sudo apt purge $(dpkg -l | egrep '^rc' | awk '{print $2}')

try to explain the command

apt purge # deinstall complete $(dpkg -l | egrep '^rc' | awk '{print $2}') dpkg -l filter lines that are beginning with rc
awk '{print $2}' #print 2. field from this filtered lines (here are the package names)

For the futere when you call apt autoremove

give the purge option

sudo apt autoremove --purge

so you have no leftovers.