Linux Troubleshooting

Fix “No space left on device” on Linux

Find what ate your disk — and free space without deleting the wrong database.

13 min read Beginner Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

Warning

Use a sudo-capable account, keep shell history for audit, and back up critical paths before changing boot, SSH, or package state.

What you will achieve

Find what ate your disk — and free space without deleting the wrong database.

1) Identify full filesystem and inode exhaustion

df -h
df -i

2) Find biggest directories quickly

sudo du -xhd1 / | sort -h

3) Reclaim safe space

sudo journalctl --vacuum-time=7d
sudo apt clean
sudo docker system prune -af
disk full linux troubleshooting