Kernel/Removal

This article describes the removal of old kernels.

Removing kernel sources
After you installed a new kernel and if it works satisfying, you can remove the old kernel. To remove the old kernel sources, emerge has the option --prune (short form -P), to remove all versions of a package except the newest version, e.g. for :

Remove kernel leftovers
In addition to the kernel sources there are more leftovers in the system, you can now remove:


 * When you build a kernel in the kernel folder, generated temp files of the build process are even after the removing of the kernel sources still there:


 * During kernel setup the kernel modules are copied to a sub folder of /lib/modules/. You can delete them now:


 * During kernel setup the kernel and potentially the System.map and the kernel config file were copied to /boot. You delete them now:


 * You can remove all leftover entries in the config file of your bootloader.