Where Docker Desktop's disk space goes on Windows, and what is safe to remove
By Bhavik · Sources checked September 19, 2026
Where Docker keeps its data
With the WSL 2 backend, Docker's documentation says Docker Desktop stores its data at C:\Users\[USERNAME]\AppData\Local\Docker\wsl by default, and you can change the location in Settings (Docker Desktop WSL 2 backend). People on Docker's forum describe a docker_data.vhdx file there that keeps growing (forum thread). That is the same kind of virtual disk described in our WSL2 guide.
See what is using the space
docker system df shows how much disk space the Docker daemon is using, and the -v flag adds detail (docker system df). The example output in the docs has a RECLAIMABLE column showing space that could be freed.
docker system df
docker system df -vWhat docker system prune removes
By default it removes all stopped containers, all networks not used by at least one container, all dangling images, and unused build cache. Adding -a also removes all unused images, not only dangling ones. Adding --volumes also prunes anonymous volumes. It asks "Are you sure you want to continue? [y/N]" unless you pass -f (docker system prune).
docker system prune
docker system prune -aWhy Windows still shows a big file
Pruning frees space inside Docker's virtual disk. The file on your Windows drive does not necessarily get smaller. Microsoft's docs note that dynamically expanding virtual disks do not shrink automatically when files are deleted (compact vdisk), and there are Docker forum threads from people whose disk file stayed large after cleaning up (example).
To get the space back on Windows you compact the disk file. The steps, including the commands and the warnings, are in Why your WSL2 disk file never shrinks. Quit Docker Desktop before you compact.
Doing this without the command line
SpaceFree's WSL and Docker compaction wizard shows how much space is trapped in each virtual disk, so you can decide whether compacting is worth it. Download SpaceFree.