Clear WSL2 Disk Space and Optimize VHD

title: Contents 
style: nestedList # TOC style (nestedList|inlineFirstLevel)
minLevel: 1 # Include headings from the specified level
maxLevel: 4 # Include headings up to the specified level
includeLinks: true # Make headings clickable
debugInConsole: false # Print debug info in Obsidian console

Code Snippet

# stop wsl
wsl --shutdown
 
# launch diskpart
diskpart
 
# select virtual disk
select vdisk file="C:\