Stop deleting files and wondering why your disk space never returned

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

Stop deleting files and wondering why your disk space never returned

🧩 The Challenge

You finally nuked those massive log files clogging up your server, but df still insists the partition is full. It’s infuriating when the OS refuses to acknowledge the space you just reclaimed.

💡 The Fix

The problem is almost certainly a ghost process holding an open file descriptor to those deleted files. You need to find the culprit and restart the service to let the kernel actually release the disk blocks.

lsof +L1

⚙️ Why It Works

This command hunts down every file that has been unlinked from the filesystem but is still being kept alive by a running process. Once you find the PID in the output, a simple systemctl restart on that service clears the lock and gives you your space back.

🚀 Pro-Tip: Use lsof +L1 | awk ‘{print $2}’ | sort -u | xargs -r ps -up to see exactly which binaries are clinging to your deleted data.

Linux Tips & Tricks | © ngelinux.com | 9/14/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted