Re: Whole lot of dir's in /lib/modules - can I delete them?

Michael <[email protected]> Mon, 27 Apr 2026 09:15:11 +0100
Newsgroups gmane.linux.gentoo.user
Message-ID <3045077.e9J7NaK4W3@rogueboard>
On Monday, 27 April 2026 08:21:22 British Summer Time Alexis wrote:
> William Kenworthy <[email protected]> writes:
> >> No ... this (possibly due to using genkernel?):
> > rattus ~ # ls -al /etc/kernels
> > total 7892
> > drwxr-xr-x   2 root root   4096 Apr 18 20:26 .
> > drwxr-xr-x 103 root root   4096 Apr 27 06:26 ..
> > -rw-r--r--   1 root root 193674 Jan 24  2020
> > 
> >  kernel-config-4.19.97-gentoo-x86_64
> > 
> > -rw-r--r--   1 root root 184104 Apr  3  2021
> > 
> >  kernel-config-5.10.27-gentoo-x86_64
> > 
> > -rw-r--r--   1 root root 153153 Jul 17  2021
> > 
> >  kernel-config-5.10.49-gentoo-r1-x86_64
> > 
> > -rw-r--r--   1 root root 220570 Jul 17  2021
> > 
> >  kernel-config-5.10.49-r1-gentoo-x86_64
> > 
> > -rw-r--r--   1 root root 220550 Jul 24  2021
> > 
> >  kernel-config-5.10.52-gentoo-x86_64
> > 
> > -rw-r--r--   1 root root 225022 Sep 12  2021
> > 
> >  kernel-config-5.10.61-gentoo-x86_64
> 
> Oh okay. i don't have an /etc/kernels/ directory, only an
> /etc/kernel/ directory, and i don't use genkernel, so you might be
> right.
> 
> Not sure if you're aware that genkernel is very deprecated, as per
> the Warning on the "genkernel" page on the wiki?
> 
> > genkernel is unmaintained; documentation presented here may be
> > incomplete and may not reflect the current state of Gentoo
> > tooling. Users encountering issues with genkernel will be asked
> > to use another tool. Please see the Distribution kernel section
> > in the Handbook for a supported alternative.
> 
> -- https://wiki.gentoo.org/wiki/Genkernel
> 
> 
> Alexis.

I configure and compile my own kernels manually, so I don't have /etc/
kernel* directory.

I didn't know about eclean-kernel - thank you Eli for pointing it out.  
I always thought the equivalent of 'sudo apt autoremove' which also 
cleans stale kernel images and files is a useful script missing from 
Gentoo.

As it happens eclean-kernel won't work on my Gentoo systems, because I 
use efistub instead of a boot manager/loader and my boot layout and 
kernel naming convention are not standard.
signature.asc (application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE-----

iQJPBAABCAA5FiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmnvGw8bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJELHqqvbClWcZT0IP/0k0FJF4wqmyCZujVgvF
p4CablzCbk7KXA2r0n8TBKgKMRlqBDoY6Baz/qpKBjILqEGUTXBndQ/A82gn0o9Q
/KrLEFBfCU4zRqgRyGA6540YJs6s7bRezsp3nOaiM1tNkDPwIDeOjljp5TcCDetY
uzJCzLMeKNaz9zBdZEEZTrfQG2JVKnV57ToZ5u5I5ECK5y3485/2XJ5gLvA4mePE
b53LJiRz88/p6vRNW+QTl94X/RKSfLfeqBAYid4sPqyilnI3XvUEyLL5gU4gweEk
NNUSfXktKAhG2N2xYb1rcF0Wjo7JIHBJvvbyqT12uckJmSMJh3g3Fbxic7XLbQZ6
ilCpEct/JayyuXMdGhhSnnvAKgucGepesSvkBkdS4oDcr3nH15d96W3qEuRpT6rj
ifd+vZkHQ0sPboZ1y6iUTLtfXvBjCY7yBSncCRO5VX+dj8mIzeYn8LpKjRMEsY9q
b0jgEie5QIu6uKf+Dr4hUxv4GmQZ8wMxoYyoDI540rSMhmwNKg7Z36/nAXHG6By+
y7XUzdvKcl9I9bbFv5baScDEPeudlRrr4DdQfnpsHBw/UDYt4EwUYHLKmfNW7BC8
N4XiDfgyKbeDINbLKiye/x6XaKcJm5kuzocG4mNUx2heB31zYc5ICDfV0T2rl9Mf
j2dA09EAkw9b1JYEuhi+YGi4
=v+mo
-----END PGP SIGNATURE-----