rmmod

Simple program to remove a module from the Linux Kernel.

Syntax
      rmmod [ -f ] [ -w ] [ -s ] [ -v ] [ modulename ]  

Key

   -f --force
      This option can be extremely dangerous: it has no effect unless CONFIG_MODULE_FORCE_UNLOAD was set
      when the kernel was compiled. With this option, you can remove modules which are being used, or
      which are not designed to be removed, or have been marked as unsafe (see lsmod(8)).

   -s --syslog
      Send errors to syslog instead of standard error.

   -v --verbose
      Print messages about what the program is doing.
      Usually rmmod prints messages only if something goes wrong.

   -V --version
      Show the version of rmmod and exit.

   -w --wait
      Normally, rmmod will refuse to unload modules which are in use. With this option,
      rmmod will isolate the module, and wait until the module is no longer used.
      Nothing new will be able to use the module, but it's up to you to make sure the current users
      eventually finish with it. See lsmod(8)) for information on usage counts. 

Examples

Blacklist the algif_aead module to mitigate the Copy Fail scratch-write bug CVE-2026-31431:

rmmod algif_aead 2>/dev/null

“I am not a fan of the internet. I think it is overrated. Intelligent information is still intelligent information and an overflow of nonsense does not really help. In German, it's called Daten-müll: data rubbish” ~ Ralf Hütter (Kraftwerk)

Related Linux commands

modprobe - Add or remove modules from the Linux Kernel.
insmod(8), lsmod(8)


 
Copyright © 1999-2026 SS64.com
Some rights reserved