Check and Rebuild Kernel Modules with DKMS
Diagnose why Wi-Fi, NVIDIA or VirtualBox broke after a kernel update and rebuild the modules for the new kernel.
Run dkms status to list each module with its kernel version and state (installed/broken); rebuild with sudo dkms autoinstall or sudo dkms install module/version -k $(uname -r).
01Command
Command
$ dkms status02What it does
DKMS automatically compiles out-of-tree modules against every new kernel, but this silently fails when kernel headers are missing. dkms status prints one line per module/kernel combination — 'installed' is healthy, 'added' or 'broken' means the module is not built for that kernel. The usual fix is installing linux-headers-$(uname -r), then running sudo dkms autoinstall so every module rebuilds for the running kernel.
03Risk
!Warning: Building modules needs matching headers for the exact kernel you are running; a version mismatch produces modules that fail to load at boot.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- dkms(8) — Dynamic Kernel Module SupportEvidence: Man page documents the 'status' action showing current dkms module/kernel states and the 'build'/'install' actions; confirms 'dkms', 'status' and 'build' appear in the text.
- dkms(8) — Debian man pageEvidence: Man page documents 'dkms status [module/version]...' and the build/install/autoinstall actions used after kernel upgrades.
Last verified: 2026-09-19 · Category: System & Settings