Ever had the the “no space left” message after trying to install a new kernel ?
The thing is that by default the system will keep the old kernels there, so the best option is to set it to delete the old ones automatically.
Starting from the beginning: For one self information, check how many kernels you do have with:
root@server [~]# rpm -q kernel
Result is something similar to this
kernel-2.6.32-431.el6.x86_64 kernel-2.6.32-431.3.1.el6.x86_64 kernel-2.6.32-431.5.1.el6.x86_64
Now you install the yum tools:
yum install yum-utils
and finally you setup so that you keep only the last 2 kernels
package-cleanup --oldkernels -count=2
If you get the message that you have unfinished transactions, just accept it, and once all is configured and set, run a yum upgrade to get the latest one.