Stop playing detective with zombie deleted files
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop playing detective with zombie deleted files
🧩 The Challenge
You ever run df and see a partition at 100% capacity, but then you run du and the math doesn’t even come close to adding up? It’s because some process is still holding a handle on a massive log file you already deleted, and the filesystem won’t reclaim that space until the process finally lets go.
💡 The Fix
Use lsof to hunt down the specific processes that are keeping those invisible deleted files pinned to your disk. Once you find the culprit, you can restart the service to free up the space without a reboot.
lsof +L1 /path/to/mountpoint
⚙️ Why It Works
The +L1 flag tells the utility to list files that have a link count of less than one, effectively surfacing the “ghost” files that you’ve already deleted but are still eating your storage.
🚀 Pro-Tip: Pipe it to grep deleted if you have a massive server with thousands of open handles.
Linux Tips & Tricks | © ngelinux.com | 9/17/2026
