[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: removing modules



	Hi.

On Sat, Jul 03, 2021 at 05:06:10PM +0100, mick crane wrote:
> If I type "lsmod" there is a big list of modules with many followed by a "0" which I guess means they are not needed in the kernel ?

Third column that lsmod shows is a kernel module reference count.
It can be increased by a userspace process which uses the module, by a
mounted filesystem or by another module.
In the last case "Used by" contains the name of such module(s).

Note that configured network interfaces do not increase module's
reference count, so unloading those won't be the best of ideas.

If the module reference count is zero, then the module can be unloaded
from the current kernel.


> Does lsmod know about all installed software and if a module is needed or does software have to be run first ?

Can you repeat it, but in plain English please?


> If I don't need them can somebody remind me how I can remove modules ?

/sbin/modprobe -r <module_to_remove>

Reco


Reply to: