Where Does Docker Store Images and Volumes on Disk?
Docker image and volume storage on Linux, macOS and Windows, including the Desktop VM disk files.
Last updated
On Linux, Docker stores everything under /var/lib/docker directly. On Mac and Windows, Docker Desktop hides that same tree inside one large VM disk file.
That split explains why disk usage surprises people on Desktop. The VM file grows as you pull images and does not shrink on its own after pruning.
Where Docker stores this, by platform
%LOCALAPPDATA%\Docker\wsl\disk\docker_data.vhdx
WSL 2 backend path for recent Docker Desktop (4.15 and later). Older installs used wsl\data\ext4.vhdx instead. Move it via Settings, Resources, Advanced rather than by hand.
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
Single sparse disk image holding images, containers and volumes. Check and move it under Settings, Resources, Advanced. Do not move it in Finder.
/var/lib/docker
Native storage. Image layers sit under overlay2 inside. Needs root to browse. Run docker system df to see what is actually eating space before deleting anything.
Frequently asked questions
Why is Docker using 60 GB when I have few images?
Stale build cache, stopped containers and old volumes count too. Prune with docker system prune, then reclaim Desktop VM space through Settings.
Can I just delete files under /var/lib/docker?
No. You will corrupt the layer store. Remove images, containers and volumes through Docker commands instead.
Notice an outdated path? Let us know.