The disk is full and I do not know what is safe to delete
A small server has filled up. I can see the partition is at capacity, and beyond obvious things like old downloads I do not know what is actually taking the space or what I am allowed to remove.
I am wary of deleting anything under the system directories, since I would rather not learn which file was load-bearing.
What is the right way to find the space, and what is genuinely safe to clear?
@disk_dilek · 3h ago
The three that catch people, because the space does not show up where they look:
A deleted file still held open. A process holding a deleted log file keeps the space allocated until it closes it, so
dusays the space is free anddfsays it is not.lsof +L1lists them, and restarting the offending service releases the space. This is the classic "I deleted it and nothing changed".Files hidden under a mount point. If something was written to a directory before a disk was mounted over it, the data is still there and invisible. Mounting the root filesystem elsewhere and looking is the only way to see it.
Snapshots. On filesystems with snapshots, deleting a file frees nothing while a snapshot references it.
dfsays full, everything you can see is small, and the answer is to expire snapshots.Any of those three explains the case where you delete a lot and the free space does not move.
Reply
Report