Find out why your disk is full even when the files are gone
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Find out why your disk is full even when the files are gone
🧩 The Challenge
You stare at your df -h output and it says the disk is 100% full, but when you run du on the root directory, it barely reports half that usage. It is the kind of silent nightmare that keeps you up at night because some phantom process is holding onto a deleted log file.
💡 The Fix
Use lsof to hunt down the specific processes that are still clinging to files you thought you already wiped. This shows you exactly what is hogging your inodes while remaining invisible to standard disk usage tools.
lsof +L1
⚙️ Why It Works
Setting the +L1 flag tells the system to only display open files that have a link count of zero, which usually means the file was deleted but a process still has it open. The space won’t actually be freed until you restart the culprit or send it a signal to release the handle.
🚀 Pro-Tip: Once you find the PID in the lsof output, check /proc/[PID]/fd to see exactly which deleted file descriptor is the leak.
Linux Tips & Tricks | © ngelinux.com | 9/21/2026
