Find deleted files still held open
df shows full but du does not | disk space not freed after deleting files | deleted log file still using space | lsof deleted files | lsof | disk-space | processeslsof -nP +L1Lists all open files with a link count of 0, meaning files that have already been deleted. Their space is only freed once the process closes them. This explains why df reports a full disk while du counts much less. The SIZE/OFF column shows the size, COMMAND and PID the responsible process.
Note: Restarting the affected service usually fixes it. lsof is not always preinstalled (apt install lsof).
Also searched as
- df shows full but du does not
- disk space not freed after deleting files
- deleted log file still using space
- lsof deleted files