SiftMac
Error message · Updated 24 November 2026

“No space left on device” on a Mac: Terminal, Docker and Xcode

By Mohit Nippanikar, who makes SiftMac

The short answer
On this page
  1. What the message means
  2. How to fix it
  3. If there’s space but it still fails
  4. Questions

1. What the message means

Apple’s manual page for system errors describes it as error 28, ENOSPC, Device out of space: a write to a file, or the creation of a folder, link or directory entry, failed because no more disk blocks were available on the file system. Programs print it as “No space left on device”, often after the path they were writing to.

The path in the message tells you which file system ran out. A path under your home folder or /tmp means the startup disk; a path under /Volumes/ means an external drive; an error printed inside a container or a docker build usually means Docker’s own virtual disk.

2. How to fix it

Check the Mac’s disks first:

df -h /
df -h /System/Volumes/Data

If the startup disk is the full one, free space as for “Your disk is almost full”: the Trash, large files, old installers, and developer caches you can rebuild.

Docker Desktop. All images, containers and volumes live inside one disk image file, by default ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw, with a size limit you set in Docker’s settings. Docker’s own steps:

docker system df -v
docker system prune

Add --volumes to prune only if you’re sure no volume holds data you need. Docker notes that deleting files inside a running container doesn’t give space back to the Mac by itself. Don’t move or delete Docker.raw in Finder; more on Docker’s disk image. Raising the disk limit in Docker’s settings gives the virtual disk more room; lowering it deletes the disk image and every container and image in it.

Xcode builds and simulators. Build products go to ~/Library/Developer/Xcode/DerivedData by default, which Apple calls often large and safe to re-create. Xcode › Settings › Components shows how much you can recover from platforms and simulator runtimes, and xcrun simctl delete unavailable removes simulators for runtimes you no longer have. See Xcode DerivedData and simulators.

3. If there’s space but it still fails

Questions

What does errno 28 mean on macOS?

ENOSPC, “No space left on device”: a write failed because the file system had no free blocks.

Why does Docker say no space left when my Mac has space?

Docker stores everything in one virtual disk with its own size limit. When that fills, containers and builds fail even though the Mac has room. Prune or raise the limit.

Is it safe to delete Docker.raw?

It deletes every image, container and volume in Docker Desktop. Use Docker’s own prune commands or its settings instead of deleting the file in Finder.

Is it safe to delete DerivedData?

Yes. Xcode rebuilds it; the next build of each project is just slower.

How SiftMac handles it. SiftMac’s developer files view finds DerivedData, old simulators, package caches and build folders, with a verdict on each and the real space removing it frees. It shows Docker’s disk image too, but tells you to free space inside it with Docker’s own tools rather than deleting it.

Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works