-
-
Notifications
You must be signed in to change notification settings - Fork 3
Linux rmmod Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to rmmod on Linux, covering Arch Linux, CachyOS, and other distributions including removing kernel modules, unloading drivers, and module removal.
rmmod (remove module) unloads kernel modules.
Uses:
- Remove modules: Unload kernel modules
- Manual removal: Remove modules manually
- Low-level: Direct module removal
- Module management: Manage modules
Note: Prefer modprobe -r for automatic dependency handling.
Basic usage:
# Remove module
sudo rmmod module-name
# Unloads moduleJust name:
# Module name only (not path)
sudo rmmod module-name
# Not: module.koVerify dependencies:
# Check if in use
lsmod | grep module-name
# Shows if module is loaded and usedForce unload:
# Force removal (dangerous)
sudo rmmod -f module-name
# -f = force (removes even if in use)Be careful:
# Force removal can cause issues
# Only use if necessary
sudo rmmod -f module-name
# May cause system instabilityCheck usage:
# Check what's using module
lsmod | grep module-name
# Unload dependent modules first
sudo modprobe -r dependent-module
sudo rmmod module-nameThis guide covered rmmod usage, module removal, and low-level module management for Arch Linux, CachyOS, and other distributions.
- modprobe Guide - Recommended method
- insmod Guide - Load modules
- Kernel Management - Kernel management
-
rmmod Documentation:
man rmmod
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.