Linux Server Root Filesystem Full: Find What Is Using the Space and Free It Safely
Overview
A full Linux root filesystem stops services writing. Use df, df -i, du and lsof +aL1 to tell blocks, inodes and deleted open files apart, then free space with a copy kept and a rollback.
Diagnose
Symptom
What responders observe.
Start here when a Linux server reports "No space left on device", a service fails on a write, or monitoring shows the root filesystem at 100 percent. Package installs, config saves or new files fail with a disk full error, even for root. One service may be down while others on the same filesystem still read normally.
Detection
Metrics, logs and confirmation commands.
Root cause
Why the incident occurred.
Contain and prevent
Blast radius
What else this can affect.
Prevention
Controls and guardrails that stop it recurring.
-
Alert on both block and inode use, at a level that leaves time to act, for example 80 percent.
-
Check both with df in your monitoring.
-
Set SystemMaxUse= and SystemKeepFree= in journald.conf (or a drop-in file) so the journal has a ceiling.
-
The journald documentation gives defaults of 10 percent and 15 percent of the file system, each capped at 4 gigabytes.
-
Put data and logs on their own filesystems so one cannot starve the others.
Fix
Pre-flight checks
Check these before you change anything.
Root or sudo rights on the affected Linux host and a recent snapshot or backup.
The names of the services that write to the filesystem and an agreed window to restart one.
Commands
df -hT /
df -i /
sudo du -xh --max-depth=1 / | sort -h | tail -n 10
sudo du -x --inodes --max-depth=1 / | sort -n | tail -n 10
sudo lsof +aL1 /
journalctl --disk-usage
sudo journalctl --vacuum-size=500M
sudo systemctl restart UNIT
Verify and recover
Verification
Evidence required before you close the incident.
Run df -hT / and df -i /. — Free blocks and free inodes, with Use% below your alert threshold. — Both are below the threshold.
Run systemctl status UNIT for each affected service and read its latest log lines. — active (running) with new log lines written after the change. — Every affected service is active and writing. Ask the service owner to run one real transaction that writes. — The transaction succeeds with no disk full error. — No write error appears.
Rollback
The safe way back.
Read vacuumed journal entries from the saved copy with journalctl --directory=BACKUP_DIR.
If a restarted service does not start, read systemctl status UNIT and start it again once the cause is fixed
recover a deleted file only from your copy or backup.
If extending a volume or moving data goes wrong, return to the copy and the snapshot taken before the change.
Escalate when
Conditions that need another owner.
-
The space is used by a database or application data you do not own, and extending the volume is not possible. df and du disagree and lsof +aL1 lists nothing.
-
The cause may be a mount hiding files underneath it, a snapshot or an unreported filesystem fault, and it needs the platform or storage team.
-
The filesystem returns read-only or I/O errors.
-
Stop making changes and escalate with the kernel log from the time of the first error.
-
The service has been down beyond the agreed recovery time.
-
Service owner Application owner Platform or storage team.
Fixed? Get the next one before it hits you: The KBY Brief
Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.
About this page
Credited to
Dates
Published
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Found this useful? Follow KBY for more like it.
Sources
Based on the vendor sources listed below. Check each step against your environment before acting.
First published 4 December 2026
df(1) - report file system space usage
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
du(1) - estimate file space usage
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
lsof(8) - list open files
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
unlink(2) - delete a name and possibly the file it refers to
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
journalctl
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
journald.conf
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
systemctl
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Recommendations for incident response
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Incident Response Recommendations and Considerations for Cybersecurity Risk Management
Cited for: Supports the documented platform behaviour, diagnosis or recovery controls used by this Runbook.
Recommended reading
More from KBY that goes with this runbook.

- Kubernetes error
Pod status: Failed / Reason: Evicted: Kubernetes Pod evicted by node pressure
2 min read
