Site icon New Generation Enterprise Linux

Quit guessing why your disk space isn’t actually free

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

Quit guessing why your disk space isn’t actually free

🧩 The Challenge

You’ve deleted a massive log file to clear space, but df still insists the partition is full. It’s infuriating when you know you purged the data but the OS refuses to acknowledge the reality.

💡 The Fix

You need to identify the process that still has an open file descriptor on the deleted file, preventing the filesystem from reclaiming those blocks. Killing or restarting that specific process lets the kernel finally scrub the bits.

lsof +L1

⚙️ Why It Works

This command specifically scans for files that have been unlinked but are still held open by a process. Once you find the PID in the output, just restart the service and watch your df numbers drop back to normal.

🚀 Pro-Tip: If you can’t restart the process, truncating the file from inside /proc/[pid]/fd/[fd] can sometimes force a release without a full service bounce.

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

0 0 votes
Article Rating
Exit mobile version