---
name: "kldunload"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/kldunload"
---

# kldunload(8)

unload a file from the kernel

## NAME

**kldunload** – unload a file from the kernel

## SYNOPSIS

**kldunload** \[**-fv**\] **-i** *id* *...*

**kldunload** \[**-fv**\] \[**-n**\] *name* *...*

## DESCRIPTION

The **kldunload** utility unloads a file which was previously loaded with [kldload(8)](/kldload/8.md).

The following options are available:

- **-f**

  Force the unload. This ignores error returns to MOD\_QUIESCE from the module and implies that the module should be unloaded even if it is currently in use. The users are left to cope as best they can.

- **-v**

  Be more verbose.

- **-i** *id*

  Unload the file with this ID.

- **-n** *name*

  Unload the file with this name.

- *name*

  Unload the file with this name.

## EXIT STATUS

The **kldunload** utility exits 0 on success, and \>0 if an error occurs.

## SEE ALSO

[kldunload(2)](/kldunload/2.md), [kldload(8)](/kldload/8.md), [kldstat(8)](/kldstat/8.md)

## HISTORY

The **kldunload** utility first appeared in FreeBSD 3.0, replacing the **lkm** interface.

## AUTHORS

Doug Rabson ⟨*dfr@FreeBSD.org*⟩
