commands
fstrim — Discard unused blocks
Request discard on supported mounted storage; dry-run skips the FITRIM ioctl. This is not a repair or secure erase. Use a fresh private workspace; live operations are VM-only.
Formal Syntax & Structure
linux syntaxlinux
fstrim --dry-run MOUNTPOINTParameters & Attributes
| Name | Type | Description |
|---|---|---|
| --dry-run | option | Do not issue FITRIM |
| MOUNTPOINT | operand | Authorized mount |
Return Value
exit status and output
Dry-run skips the discard ioctl; output or status reflects the attempted dry-run workflow, not discarded bytes. Consult installed util-linux behavior for unsupported mounts and do not infer real trim success.
Working Example
Example Snippetlinux
fstrim --help