Skip to content

Instantly share code, notes, and snippets.

@consatan
Created November 26, 2021 02:38
Show Gist options
  • Save consatan/1bfe883b8d8a5d9d26c7ae5a348df77c to your computer and use it in GitHub Desktop.
Save consatan/1bfe883b8d8a5d9d26c7ae5a348df77c to your computer and use it in GitHub Desktop.
Windows release WSL2 and docker VHD file quota
WSL2 vhd location
C:\Users\{USERNAME}\AppData\Local\Packages\{DISTRO}\LocalState\{DISTRO_PACKAGE_NAME}\ext4.vhdx
Docker for Windows vhd location
C:\Users\{USERNAME}\AppData\Local\Docker\wsl\data\ext4.vhdx
# delete unuse volume
docker volume prune
exit docker for windows (Right-clicking the whale icon in the notification area (bottom right) > Quit Docker Desktop)
Win+X, A (powershell administrator mode)
wsl --shutdown
Optimize-VHD -Path {VHD_LOCATION} -Mode Full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment