inconsistency between "docker system df" and Docker Desktop on Mac

Viewed 573
#docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          222       0         42.87GB   42.87GB (100%)
Containers      0         0         0B        0B
Local Volumes   10        0         77.68MB   77.68MB (100%)
Build Cache     946       0         7.982GB   7.982GB

From the docker system df command, it seems my docker disk is running out of space. But Docker desktop shows: enter image description here

So I am confused which one should be the right one to indicate docker space usage?

2 Answers

If you're on a mac/windows, then it means that behind the scenes you're running a VM running linux. That disk size then corresponds to the VM disk size containing the Linux distro, rather than just the docker stuff.

Actually, the RECLAIMABLE column is basically the size and percentage of the resources that aren't in use, there is no container using these images/volumes. In your case, 100% of the images and volumes are in "Idle" so you can remove them if you want, there are some good ways to remove it like docker image prune and docker system prune.

The image that you sent has what you are looking for.

Related