CompTIA Linux+ (XK0-004) — Question 199
A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?
Answer options
- A. rmmod -c
- B. depmod -r
- C. insmod -c
- D. modprobe -r
Correct answer: D
Explanation
The correct command is 'modprobe -r', as it removes modules and their dependencies. The 'rmmod -c' command is used to remove modules but does not handle dependencies. 'depmod -r' is not applicable for removing modules, and 'insmod -c' is meant for inserting modules, not removing them.