Our Ubuntu-servers all seem to have various unused kernel-modules loaded wasting RAM and, in the case of jfs for example, running a bunch of useless processes (jfsCommit).

I can use rmmod to get rid of them at runtime, but I wonder, what causes them to load in the first place.

Ideally, I'd be able to remove the module-binaries too.

  • Did you previously mount and unmount a JFS filesystem? That would cause the module to be loaded but not currently used. – Michael Hampton Dec 13 '17 at 17:59
  • No... Also most certainly haven't used btrfs, ntfs and the like either -- and all are loaded. – Mikhail T. Dec 13 '17 at 22:31

If the modules in question are built into the kernel, the only way is recompiling the kernel.

If they are separate modules, you can blacklist them.


blacklist module_name

to the file


(needs restart)

| improve this answer | |
  • Thanks. But what causes these to be loaded in the first place? Or is everything available, that's not explicitly blacklisted loaded at boot? – Mikhail T. Dec 13 '17 at 22:35
  • The kernel loads the modules according to what is in the subdirectories of /lib/modules. But it's not advisable to delete files there, it tends to get messy. – alinepegas Dec 14 '17 at 9:34
  • So, everything under /lib/modules is loaded which is not explicitly blacklisted? – Mikhail T. Dec 15 '17 at 12:03
  • 1
    Not everything. Modprobe will load the ones whose dependencies are on /lib/modules/$(uname - r)/modules.dep and the corresponding binaries are on /lib/modules/$(uname - r)/modules.dep.bin – alinepegas Dec 15 '17 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.