Site icon New Generation Enterprise Linux

Find out why your files are still holding space open

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

Find out why your files are still holding space open

🧩 The Challenge

You’ve deleted a massive log file to clear disk space, but the df command keeps insisting the partition is 100% full. It’s infuriating because you know the file is gone, yet the system is clearly still holding onto the data.

💡 The Fix

Processes are keeping open file handles to deleted files, so you need to hunt down those zombies and restart the services using them. This saves you from having to reboot a production server just to reclaim a few gigabytes of space.

lsof +L1

⚙️ Why It Works

This command scans your open file list for any files that have a link count of less than one, which is exactly how Linux identifies deleted but still-held files. Once you see the PID in the output, you can send a HUP signal or restart the process to force it to release the block.

🚀 Pro-Tip: Always check the ‘NLINK’ column; if it’s zero, that process is actively sitting on space you should have back.

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

0 0 votes
Article Rating
Exit mobile version