Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My boot partition is getting filled up after a number of kernel upgrades.
Is it okay to remove the old kernels from the /boot?
I see that the boot partition has config-..., initrd-..., System.map-..., and vmlinuz-...
Do I remove all 4 of them excluding the latest kernel?
Yeah, you can remove the old kernels and associated files if you don't plan to use them. I always keep the kernel I've most recently compiled and at least one older, known working kernel (usually the one I had been using just before recompiling). Once you've used the new kernel for awhile and feel that it doesn't have any issues, you can remove the older one.
You may also want to delete the lines for the removed kernels from the menu.lst/grub.conf so they don't appear in the boot menu.
The /boot partition normally contains both (1) the boot-loader program .. these days usually Grub .. which loads the Linux kernel, and (2) the various kernel-image files themselves. This is, basically, how and where the "always-resident software known as 'the Linux kernel'" manages to get into the memory of your computer when you first turn it on.
Usually, you are given a choice of exactly which version of the kernel you want to run, when you start your machine. This is so that, if something's wrong with "the latest" one, you can easily fall-back to "the previous" one. Kernel updates, therefore, usually do not remove "the previous" version. And eventually the /boot partition begins to run out of room.
When you are using a package-based system such as rpm, it is important that you continue to use that package-based system when you want to "clean house." You should explicitly un-install the previous versions... don't just remove the files yourself. This will keep the package-system's database up-to-date as to what is actually present on your system and what is not. When you uninstall the older packages, you should see the older files disappear from /boot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.