Find Deleted Files Still Holding Disk Space (lsof +L1)

When df says full but du disagrees, open-but-deleted files are the usual culprit; lsof +L1 lists them with the process holding each.

LinuxdisktroubleshootinglsofMedium risk
Run `sudo lsof +L1` to list deleted files still held open, then restart the owning process to free the space.

01Command

Command
$ sudo lsof +L1

02What it does

On Linux, deleting a file only unlinks it — the space is released when the last process with it open exits, so a log rotated out from under a running daemon can pin gigabytes. `sudo lsof +L1 | sort -k7 -n -r` sorts the biggest first using the SIZE/OFF column. The fix is to restart or gracefully reload the holding process (e.g. `systemctl reload rsyslog`); truncating via the /proc/PID/fd/N link is a last resort.

03Risk

RiskMedium risk
Requirementslsof installed (default on most distros)

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • lsof(8) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: The +L1 option selects files with a link count less than one, i.e. open files that have been unlinked (deleted).

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions