The former installonlyn yum plugin is now built into yum. You must add the variable installonly_limit = # (where # is the number of kernels you want to maintain installed when a new kernel is installed) to your yum.conf file in CentOS 5.2. The default if nothing is added is 3 kernels. This will need to be updated even if you have the current plugin turned off or set to a different number as it does not happen automatically.