Clean up older installed kernels on CentOS
Linux generally keeps multiple versions of the kernel installed. This is done to maintain backwards stability and allow the selection of an older (tried and tested) kernel if the latest update fails in any way.
On a small system all these kernel versions can quickly add up and waste valuable space. In such case keeping only the needed versions (the latest and the one currently booted, if different) is an acceptable risk to take.