Stop deleting files that keep taking up space
Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)
Stop deleting files that keep taking up space
🧩 The Challenge
You’ve deleted a massive log file to clear up space, but df says the drive is still full. It happens to the best of us, and it’s usually because some hung process still has the file handle open.
💡 The Fix
Use lsof to track down exactly which zombie process is holding onto your deleted file and keeping it from actually freeing the blocks on disk. Just kill the process or restart the service to finally get your storage back.
lsof +L1
⚙️ Why It Works
Adding the +L1 flag tells the tool to list all open files that have a link count of zero, which is the technical way of saying the file is deleted but not yet closed. It saves you from rebooting the whole machine just to reclaim a few gigabytes of space.
🚀 Pro-Tip: If it’s a critical production service, don’t just kill it; send a HUP signal first to see if it’ll close the file handle gracefully.
Linux Tips & Tricks | © ngelinux.com | 9/17/2026
