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
