Skip to content

Instantly share code, notes, and snippets.

@urigoren
Created January 14, 2023 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urigoren/2c2aec6bb6a2f2b64af3583783519b51 to your computer and use it in GitHub Desktop.
Save urigoren/2c2aec6bb6a2f2b64af3583783519b51 to your computer and use it in GitHub Desktop.
How to reclaim WSL2 space
wsl --shutdown
diskpart
# open window Diskpart
select vdisk file="C:\Users\ugore\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment