The kernel removal procedure is irreversible. Before uninstalling, be sure to test the current kernel for performance.
You can view a list of all installed kernels using the command:
rpm -q kernel
yum install yum-utils -y
Remove unnecessary kernels by running:
package-cleanup --oldkernels --count=2
--count=2 - the number of system cores to be left (in the example - 2).
To automatically remove kernels during an update, you must change the parameter
Cannot be greatly reduced
installonly_limit (especially below 2), as this can provoke situations in which the server will stop working after the update.