OSError: [Errno 28] No space left on device Docker, but I have space

Docker leaves dangling images around that can take up your space. To clean up after docker, run the following:

docker system prune -af

We can use the ‘until’ keyword with the ‘–filter’ option to remove objects that are created before a given timestamp or duration as shown below (objects older than 2 minutes):

docker system prune -a --filter “until=2m”

or in older versions of docker:

docker rm $(docker ps -q -f 'status=exited')
docker rmi $(docker images -q -f "dangling=true")

This will remove exited and dangling images, which hopefully clears out device space.

More reading

Meta: Putting this answer here because it’s the top stack-overflow result for that failure and this is a possible fix for it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)