HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

fstrim — Discard unused blocks on a mounted filesystem. Only supported by flash memory devices such as SSDs a

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandfstrimunusedmountedclidiscardfilesystemblocks
linux

Problem

How to use the fstrim command: Discard unused blocks on a mounted filesystem. Only supported by flash memory devices such as SSDs and microSD cards. More information: <https://manned.org/fstrim>.

Solution

fstrim — Discard unused blocks on a mounted filesystem. Only supported by flash memory devices such as SSDs and microSD cards. More information: <https://manned.org/fstrim>.

Trim unused blocks on all mounted partitions that support it:
sudo fstrim {{[-a|--all]}}


Trim unused blocks on a specified partition:
sudo fstrim {{/}}


Display statistics after trimming:
sudo fstrim {{[-v|--verbose]}} {{/}}

Code Snippets

Trim unused blocks on all mounted partitions that support it

sudo fstrim {{[-a|--all]}}

Trim unused blocks on a specified partition

sudo fstrim {{/}}

Display statistics after trimming

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

Context

tldr-pages: linux/fstrim

Revisions (0)

No revisions yet.