Stop the invisible space hogs when du reports lies
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop the invisible space hogs when du reports lies
🧩 The Challenge
You’ve been staring at a disk that reports as 90% full, but running du on the root directory adds up to barely a fraction of that. I’ve wasted hours wondering if my math was broken before realizing I was looking at ghost files.
💡 The Fix
The problem is almost always deleted files that are still held open by a process, preventing the kernel from actually freeing the blocks. You need to check the list of deleted files currently being kept alive by active processes.
lsof +L1 /
⚙️ Why It Works
Processes like loggers or database engines often keep handles on files after you’ve run rm, which means the space stays allocated until those specific processes are restarted or stop holding the file descriptor. Checking for that +L1 flag tells lsof to only show files with a link count of zero.
🚀 Pro-Tip: Once you identify the culprit, just restart the service instead of rebooting the whole box.
Linux Tips & Tricks | © ngelinux.com | 11/28/2026
