Since a few days, I'm not able to update my home machine anymore. yum update tries to remove some of the kernel-devel packages, and rpm just keeps eating memory on that task. Manually doing rpm -e kernel-devel-... for a single version of kernel-devel yields the same result. This is on a machine with 256MB. After adding 2GB of swap, rpm still gets OOM killed after a while.
How many kernels do you have installed?
I successfully removed all kernel versions except for the last 2, but there are quite a few kernel-devel versions installed. I think around 15 - 20. The earliest one is 1600_FC5 IIRC.
On a 256Mb machine with 15-20 kernel-devel packages installed you will probably have to remove the files manually for i in list_of_kernel_devel_pkgs; do rm -f `rpm -ql $i` done and then write a program to delete the headers in /var/lib/rpm/Packages by their instance key. That program used to exist at http://people.redhat.com/jbj, no idea where that has gone.