Show disk space used by docker images, containers and volumes.

1
2
3
4
5
6
7
$ docker system df

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              5                   5                   1.722GB             784.5MB (45%)
Containers          5                   0                   78.12MB             78.12MB (100%)
Local Volumes       4                   4                   231.5MB             0B (0%)
Build Cache         0                   0                   0B                  0B

The docker prune command may be used with some docker objects like images, containers and volumes to free unused disk space.

Free space used by containers.

1
docker container prune

Free space used by volumes.

1
docker volume prune

In addition, you can use the docker system prune command to clean up multiple types of objects at once.

1
docker system prune -af