Re: Whole lot of dir's in /lib/modules - can I delete them?
[email protected] Mon, 27 Apr 2026 01:10:10 +0800
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <[email protected]> |
On 4/27/26 12:10 AM, Michael wrote: > On Sunday, 26 April 2026 16:52:30 British Summer Time > [email protected] wrote: >> Dear all, [snip] >> Andrew > > Whenever you build a kernel with various options built as modules [M], > as opposed to building them in-kernel [*], the compiled modules are > stored under /lib/modules/. > > You can find all available modules of your current kernel with: > > find /lib/modules/$(uname -r) -type f -name '*.ko*' > > If you have cleared out old kernel images and initramfs files from your > /efi/ or /boot/, then you have no use for their old module files hanging > around in your /lib/modules/ and you can safely delete them manually to > recover disk space. Thanks Michael, that's what I though. I've been using the prebuilt kernel, "-bin" for a while hence a whole lot of modules but have to get back to my own build which usually has stuff all built-in. And yes, I have been deleting stuff in /efi/EFI/Gentoo but didn't think of /lib/modules. Thanks, Andrew