My debian server has about 20 old kernels listed in grub. there taking up loads of space. I dont want to just remove the entries from grub, i want to actually remove all kernels aparat from the most recent one (it works fine). I would usually use synaptic for this but this server has no GUI.

How can i list all the installed kernel versions?

and if i list them can i just do apt-get remove?

try removing the items from /boot/...all the img and vmz..files would be listed there. the ones that u don need u can remove them and as well remove the entries from the menu.lst. Though this is I admit is a very poor solution..i dont know any better

i did it in the end by noting down the kernel numbers shown in grub and then doing apt-get remove.

yeah i should have thaught about using grep thank you :)