Docker no space left on device

You can run a docker system prune --all --force command to do some cleanup.

$ docker system prune --help

Usage:	docker system prune [OPTIONS]

Remove unused data

Options:
  -a, --all             Remove all unused images not just dangling ones
      --filter filter   Provide filter values (e.g. 'label=<key>=<value>')
  -f, --force           Do not prompt for confirmation
      --volumes         Prune volumes
$ docker system prune --all
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache

To skip the prompt:

docker system prune --all --force

To delete volumes currently not being used by a running or stopped container:

docker system prune --all --force --volumes
5 Likes