Files
cheatsheet-tldr/tldr/linux/fstrim
2025-03-29 00:18:23 +00:00

23 lines
515 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# 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]}} {{/}}`