To much kernels installed, but config gives a limit of 5

An observation and an idea/theory, hoping to bring some clues:

Observation
When using yum, if a new kernel is available and the number of installed kernels matches the number of kernels to keep, an old kernel is removed:

=========================================================================================================
 Package                           Arch       Version                       Repository              Size
=========================================================================================================
Installing:
 kernel                            x86_64     3.10.0-693.17.1.el7           updates                 43 M

Updating:
 dhclient                          x86_64     12:4.2.5-58.el7.centos.1      updates                282 k
 kernel-tools                      x86_64     3.10.0-693.17.1.el7           updates                5.1 M
 kernel-tools-libs                 x86_64     3.10.0-693.17.1.el7           updates                5.1 M
 kmod                              x86_64     20-15.el7_4.7                 updates                121 k
 kmod-libs                         x86_64     20-15.el7_4.7                 updates                 50 k

Removing:
 kernel                            x86_64     3.10.0-514.21.1.el7           @updates               148 M

Idea
Maybe pkgaction update (or UI) only looks which packages can be updated but it’s unaware of associated removal actions.

3 Likes