Sparewise

Docker is using too much disk space on Windows

Short answer: Docker Desktop keeps everything in one virtual disk (a .vhdx file under %LocalAppData%\Docker\wsl). Old images, stopped containers and build cache pile up inside it, and the file does not shrink by itself, even after you clean up inside Docker.

By hand

  1. See what Docker can reclaim: docker system df
  2. Remove what nothing uses: docker system prune. Add -a for unused images; use --volumes only if you are sure, because volumes can hold databases.
  3. Shrink the disk file so Windows gets the space back. WSL must be shut down first (wsl --shutdown).

With Sparewise

Sparewise does this safely

Download for Windows

Free · No admin rights · No telemetry · Everything it moves can be put back