commands.sh

fstrim

linux

Discard unused blocks on a mounted filesystem. Only supported by flash memory devices such as SSDs and microSD cards.

More info →

Options (2)

-a, --allboolean

Trim unused blocks on all mounted partitions that support it

Example: sudo fstrim {{[-a|--all]}}
-v, --verboseboolean

Display statistics after trimming

Example: sudo fstrim {{[-v|--verbose]}} {{/}}

Examples (3)

Trim unused blocks on all mounted partitions that support it

sudo fstrim [-a|--all]

Trim unused blocks on a specified partition

Display statistics after trimming

sudo fstrim [-v|--verbose] /
made by @shridhargupta | data from tldr-pages