← Back to Error Index
root@linuxfix:~/no_space_left_on_device$
No space left on device
Disk space or inodes exhausted

Solutions

Prerequisites: Start by updating your system to resolve common issues and ensure the solutions provided below are compatible with your current environment.
check_latest_version && sudo apt update && sudo apt upgrade -y
Check disk usage

Find space consumption:

df -h
du -sh /*
du -sh /var/log
Clean up files

Remove unnecessary files:

sudo apt autoremove
journalctl --vacuum-time=7d
find /tmp -type f -atime +7 -delete
Check inodes

Verify inode usage:

df -i
find /path -type f | wc -l

What is No space left on device?

The filesystem has no available space or inodes to complete the requested operation.

Common scenarios: Disk full, inode exhaustion, large logs, or temporary file accumulation.

Common Causes

  • Disk space full
  • Inode limit reached
  • Large log files
  • Temporary files
  • Failed cleanup

Debugging Tips

lsof | grep deleted
find / -size +100M
du -x --max-depth=1 /

Prevention

  • Monitor disk usage
  • Set up log rotation
  • Regular cleanup
disk space storage filesystem