Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I would like to temporarily (until next boot) disable a kernel module.

How can I do this?

share|improve this question
@Rinzwind I'm not trying to blacklist it. I just want to remove it until I reboot. – Seth Jul 6 '13 at 21:55

2 Answers 2

up vote 5 down vote accepted

Use lsmod to find the name of a kernel module about that you are interested to disable it temporary. After you've found the name, use next command to disable the module:

sudo modprobe -r <module_name>

However, this command will fail with an error message something like FATAL: Module <module_name> is in use if a process is using:

  • the <module_name>
  • a module about that <module_name> directly depends on
  • any module about that <module_name> - through the dependency tree - depends on indirectly.

You can use lsmod | grep <module_name> to obtain the names of the modules which are preventing you from disable temporary a certain module (these module names are listed in the last column).

More about:

share|improve this answer
This doesn't however, disable or 'remove' buildin modules, which will give an FATAL: Module g_serial is builtin. error. – Tim Visee Jun 16 at 13:12

It appears:

sudo modprobe -r moduleName

Achieves what I want. The module is removed and reloaded upon reboot.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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