Stop panic-deleting files when your partition is actually full

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

Stop panic-deleting files when your partition is actually full

🧩 The Challenge

Everyone has had that moment where df says the disk is 100% full, but running du on every directory comes up way short. It is infuriating to stare at a “No space left on device” error when the math just doesn’t add up.

💡 The Fix

The culprit is almost always a deleted file that is still held open by a long-running process. Checking which process still has a file handle open will save you from nuking important logs that aren’t actually eating your space.

lsof / | grep deleted

⚙️ Why It Works

Because the kernel won’t actually free up the sectors until the process closes the file handle, those “ghost” files stay pinned to your disk. Identifying the PID allows you to restart the specific service instead of rebooting the whole machine.

🚀 Pro-Tip: Restarting the service is cleaner than killing the process, so check your systemd status first.

Linux Tips & Tricks | © ngelinux.com | 8/23/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted