Skip to main content
“No space left on device” means a filesystem can’t store any more data. Usually the disk is full, but it can also run out of inodes (file slots) or keep space for deleted files that a program still has open. Run df -h and df -i to see which, find the large folders with sudo du -xh / --max-depth=1 | sort -h, then delete or shrink what you don’t need.

Before you start

  • A full disk breaks databases, logins and package updates. Free a little space first, then look for the cause.
  • Don’t delete files you don’t recognise in /usr, /lib, /boot or /var/lib. Remove logs, caches, old backups and downloads instead.
  • Commands use sudo. As root, leave it out.

Step 1: Find out which kind of “full” it is

Check the mount point in the last column too. A full /boot, /tmp or /var gives the same error even when / has room.

Cause 1: The disk is full

Check which top-level folders are largest, then go one level deeper into the biggest:
List single large files:
Fix the usual space users:
Shrink the systemd journal to 200 MB:
Empty a huge log file without deleting it (the program keeps writing to it):
Old backups, database dumps and game server worlds in home folders are other common finds. For a guided search, see find what is using disk space.

Cause 2: Out of inodes

Every file uses one inode. Millions of tiny files (session files, cache files, mail queues) can use them all while plenty of space is left. Check which folder holds the most files:
Fix: delete the unneeded small files in that folder, for example old PHP sessions or a cache directory, and fix the program that creates them.

Cause 3: Deleted files still held open

When you delete a log file that a running program still writes to, the space isn’t freed until that program closes it. Check:
Fix: restart the program shown (here sudo systemctl restart nginx). If you can’t restart it, empty the file through its file descriptor (PID and FD number from the output):
Install lsof first if it’s missing: sudo apt install lsof or sudo dnf install lsof.

Cause 4: Reserved blocks on ext4

ext4 keeps 5% of the space for root by default, so system services keep working when users fill the disk. Normal users then see the error while df still shows a little room. Free space as in Cause 1. Don’t remove the reserve on the root filesystem.

Cause 5: The disk is bigger, but the partition isn’t

If you upgraded your plan and lsblk shows a larger disk than df -h shows for /, the extra space isn’t in use yet. See resize a partition after a disk upgrade and manage VPS storage.

How to check it worked

Use% should be well under 100%. Keep at least 10 to 15% free so logs and updates have room.

Frequently asked questions

I deleted files but df still shows the disk full. Why?

A program still has them open. Run sudo lsof +L1 and restart that program (Cause 3).

Can a full disk stop my server from booting?

It can stop services such as databases from starting and can block logins that need to write files. Free space from the VNC console or rescue mode if SSH fails.

How do I stop this happening again?

Limit the journal with SystemMaxUse=500M in /etc/systemd/journald.conf, make sure logrotate runs, and set up disk alerts.

VPS and dedicated server guides

Every guide in this section.

Check disk space

Read df and du output.

Find what uses disk space

Track down the biggest folders.

Clean up Docker disk space

Remove unused images and volumes.

Read-only file system errors

A different reason writes fail.

Checked against the official journalctl manual, journald.conf manual and tune2fs manual on 4 November 2026; the full-disk and out-of-inodes errors, lsof +L1, truncating a deleted open file and the 5% ext4 reserve were reproduced on small test filesystems on Ubuntu 24.04 LTS. The dnf commands were not tested.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026