Open AmineDjeghri opened 4 months ago
Doesn't have to be optimize-vhd
(I think I had an issue getting that available when I tried prior to wslcompact)
My comment provides plenty of insight: https://github.com/microsoft/WSL/issues/4699#issuecomment-2209770016
select vdisk file="ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
Should be easy to implement.
Can you please add the disk usage for the distros and also the ability to reclaim the disk space ?
Here is what i do to reclaim it :
df -h
look on the right column 'Mounted on,' ordf -h /mnt/wslg/distro
wsl --shutdown
thencd 'C:\Users\%UserProfile%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState'
thenoptimize-vhd -Path .\ext4.vhdx -Mode full