Stop chasing ghost space when your logs get deleted but the disk stays full

Disk & Filesystem Management (Du/Df/Lsblk/Fstrim)

Stop chasing ghost space when your logs get deleted but the disk stays full

🧩 The Challenge

Ever nuked a massive log file to clear up space, only to run df and see the disk is still reporting as 100 percent full? It’s enough to make you want to walk away from the keyboard entirely.

💡 The Fix

The process that opened the file is still holding onto the file descriptor, so the OS won’t actually reclaim the blocks until that process exits or restarts. Use a quick check to find the culprit so you can kill it or signal it to reopen the log.

lsof +L1

⚙️ Why It Works

Adding the +L1 flag tells lsof to filter for files that have been unlinked but are still held open by an active process, which is exactly why your space isn’t showing up as free. Once you spot the PID, you can send it a HUP signal to get it to release the file handle without a full service bounce.

🚀 Pro-Tip: If the process is something vital like Nginx, don’t just kill it; send a SIGHUP instead to force a clean log rotation.

Linux Tips & Tricks | © ngelinux.com | 10/27/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted