Linux Backup and Disk Imaging Cheat Sheet/Trim mounted SSD filesystems

Discard unused blocks on mounted SSD-backed filesystems.

Section: Troubleshooting

Trim mounted SSD filesystems

bash
bash
sudo fstrim -av
Explanation

Discard unused blocks on mounted SSD-backed filesystems.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Troubleshooting
Show disk throughput and utilization
Inspect per-device read/write rates and utilization over time.
OpenIn sheetbashsame section
Watch per-process I/O usage
Find which processes generate the most disk I/O.
OpenIn sheetbashsame section
Show per-process I/O counters
Track read/write activity by process over time.
OpenIn sheetbashsame section
Show system-wide I/O wait and block activity
Quick check for iowait, swap, and block device pressure.
OpenIn sheetbashsame section
Filter kernel logs for storage messages
Look for hardware and filesystem errors in kernel logs.
OpenIn sheetbashsame section
Search journal for disk errors
Kernel journal view for storage-related problems.
OpenIn sheetbashsame section