Disk Space Triage

When disk fills up, services fail in strange and unhelpful ways.

Step 1 – Confirm the problem

df -h

If / or /var is above 90%, proceed.

Step 2 – Find the largest directories

This shows the top-level space usage under /var:

du -xhd1 /var | sort -h

Common offenders:

Step 3 – Common culprits

Log files

du -xhd1 /var/log | sort -h

If a log is enormous, identify it:

ls -lhS /var/log | head

Mail spool / queue

Depending on configuration, large mail queues can chew space.

Check disk usage:

du -xhd1 /var/spool | sort -h

Temporary directories

du -xhd1 /tmp | sort -h
du -xhd1 /var/tmp | sort -h

Step 4 – Quick safety actions

Before deleting anything:

Step 5 – After cleanup

df -h
systemctl --failed

If services failed due to “no space left on device”, restarting the affected service may be required after space is restored.