Five Classic Linux Tips!

Our forum moderator is on vacation this week, but that doesn't stop him from digging up five classic Linux tips.

How to remove old kernel files?

How best to remove all files and directories associated with a kernel that is no longer needed? Is there a single command that can be issued as root to accomplish this?

Currently, after installing several kernels, I may choose to remove one or more of the older kernels. The procedure I follow is: (1) Go to /boot and (2) Delete the kernel related files. For example, If I no longer want kernel 2.4.22-30 for Mandrake 9.2, I remove the following files:

config-2.4.22-30mdk
initrd-2.4.22-30mdk.img
kernel.h-2.4.22-30mdk
System.map-2.4.22-30mdk
vmlinuz-2.4.22-30mdk

This seems simple enough, but I noticed that there are other files "hanging around" that perhaps could be deleted as well.

Is Linux immune to viruses?