Skip to content

Instantly share code, notes, and snippets.

@thumbarnirmal
Last active November 28, 2022 09:57
Show Gist options
  • Save thumbarnirmal/e4700c7991942c4c7f2437a54a9b059d to your computer and use it in GitHub Desktop.
Save thumbarnirmal/e4700c7991942c4c7f2437a54a9b059d to your computer and use it in GitHub Desktop.
## Powershell commands
# Shutdown WSL
wsl --shutdown
# Confirm WSL shutdown
wsl --list -v
# Optimize disk to release extra space
# Update path to vhdx file as per your system
# Usually it is located at C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu...\LocalState
Optimize-VHD -Path .\wsl\Ubuntu-20.04\ext4.vhdx -Mode full
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment