# man > depmod(8)

---
type: CommandReference
command: depmod
mode: man
section: 8
source: man-pages
---

## Quick Reference

- `depmod` — generate all module dependencies for current kernel
- `depmod -b /path` — generate deps using modules in /path/lib/modules/version
- `depmod -n` — dry-run: print output to stdout instead of writing files
- `depmod -A` — only regenerate if any module is newer than modules.dep
- `depmod -e -F System.map` — report unresolved symbols
- `depmod -E Module.symvers` — check symbol version mismatches
- `depmod -v` — verbose: print all symbol dependencies
- `depmod 5.10.0` — generate deps for a specific kernel version

## Name

Generate modules.dep and map files.

## Synopsis

depmod [-b basedir] [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-A] [-P prefix] [-w] [version]
depmod [-e] [-E Module.symvers] [-F System.map] [-n] [-v] [-P prefix] [-w] [version] [filename...]
## Options

### General

- `-a, --all` — Probe all modules. Enabled by default if no filenames given.
- `-A, --quick` — Only regenerate if any module is newer than modules.dep; otherwise exit silently.
- `-b, --basedir basedir` — Prepended to the module directory path (e.g., for staging). Stripped from output paths.
- `-C, --config config` — Override default config directory `/etc/depmod.d/`.
- `-n, --show, --dry-run` — Print results to stdout instead of writing files.
- `-v, --verbose` — Print each symbol dependency: module name and the file providing it.
- `-V, --version` — Show program version and exit.
- `-w` — Warn on duplicate dependencies, aliases, or symbol versions.
- `-h, --help` — Print help and exit.

### Error Checking

- `-e, --errsyms` — With `-F`, report symbols needed by modules but not provided by other modules or kernel.
- `-E, --symvers Module.symvers` — With `-e`, check that symbol versions match kernel's Module.symvers. Incompatible with `-F`.
- `-F, --filesyms System.map` — With `-e`, use System.map to resolve kernel symbols. Incompatible with `-E`.
- `-P prefix` — Ignore a prefix character (e.g., `_`) prepended to symbols on some architectures.

## Examples

Basic usage for current kernel:

shell
depmod
Generate dependencies for a specific kernel version:

shell
depmod 5.10.0
Stage modules in a temporary root and produce relocatable output:

shell
depmod -b /tmp/root -n
Quick check: only regenerate if modules changed:

shell
depmod -A
Verbose output showing all symbol dependencies:

shell
depmod -v
Check for unresolved symbols against a System.map file:

shell
depmod -e -F /boot/System.map-5.10.0
Check symbol version mismatches:

shell
depmod -e -E /path/to/Module.symvers
## See Also

- [depmod.d(5)](https://www.chedong.com/phpMan.php/man/depmod.d/5/markdown)
- [modprobe(8)](https://www.chedong.com/phpMan.php/man/modprobe/8/markdown)
- [modules.dep(5)](https://www.chedong.com/phpMan.php/man/modules.dep/5/markdown)