#Check the current kernel version

See the list of installed kernels

 

Ubuntu
CentOS:

 

#remove all old kernels – keep the lastest 2