If you want to remove old kernels for any reason you can follow below steps.
First, you need to install yum-utils package on your server to clean up older kernels and configure yum not to keep too many versions.
yum install yum-utils
Now, check the list of kernels that you have installed:
rpm -q kernel
Run below command to keep only two of the latest kernels
package-cleanup --oldkernels --count=2
To make the permanent changes when installing & updating kernels via yum command, edit /etc/yum.conf file with below line :
installonly_limit=2
This is very well written, interesting and particularly helpful. Thank you