Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop your NVMe drives from choking when you delete big files
đź§© The Challenge
You finally clear out those massive old backup snapshots, but the disk space never seems to actually free up in your monitoring tools. I have wasted way too many hours rebooting servers just to see the storage reclaim itself.
đź’ˇ The Fix
Most modern filesystems on SSDs don’t tell the hardware you’ve deleted blocks until you explicitly tell them to do so via fstrim. It keeps your drive performant and actually lets the OS know what space is truly usable.
fstrim -av
⚙️ Why It Works
This utility walks through the filesystem and notifies the SSD controller that specific blocks are no longer in use, which allows the drive to perform its internal garbage collection more efficiently. Under the hood, it’s issuing the discard command that the kernel has been queuing up.
🚀 Pro-Tip: Add a weekly systemd timer for this and you can stop thinking about it entirely.
Linux Tips & Tricks | © ngelinux.com | 9/12/2026
