On 2022-07-15 00:21+0100 Wol <antli...@youngman.org.uk> wrote: > On 15/07/2022 00:01, Dale wrote: > > Guillermo García wrote: > >> > >> Hello again guys, how are you? I hope you're fine. > >> > >> I remember someone told me a program to use to remove old kernels > >> in order to get more space on /boot, i tried to search the > >> original message that the guy sent me trough this list, but i > >> cannot find it. > >> > >> Here's a screenshot of my /boot folder: > >> > >> I guess the kernel version i use is this one: > >> > >> Could someone tell me a method to remove the old kernels in order > >> to get more space in /boot? > >> > >> Thank you, and regards, > >> > >> Guillermo. > >> > > > > > > I found it for you. The package is app-admin/eclean-kernel. I > > think there is a wiki page on the Gentoo website for that. I > > recall it being pretty easy to use. > > > Bear in mind, if the OP is running 5.15.10, that's the second oldest > kernel in the list. If he's got five newer kernels there, is > eclean-kernel going to assume the live kernel is out-of-date and > delete it? NOT a good idea. > > The OP needs to make sure that both 5.15.41 and 5.15.48 are in his > boot menu, AND that they both work, before risking clearing out the > rest ...
The current kernel is never removed by eclean-kernel. > The kernel choice algorithm is quite simple: > > 1. If the kernel is currently used, don't remove it; > 2. If the kernel is referenced by a bootloader, don't remove it > (unless ``--destructive``); > 3. If auxiliary files do not map to existing kernel, remove them; > 4. If ``--all`` is used, remove the kernel; > 5. If kernel is not within *N* newest kernels (where *N* is the > argument to ``-n``), remove it. <https://github.com/mgorny/eclean-kernel/blob/master/README.rst> Since the grub boot menu includes all kernels in /boot by default as far as i know, it is probably necessary to run eclean-kernel with --destructive and re-generate the boot menu afterwards. Kind regards, tastytea