wsl --shutdown
diskpart
# open window Diskpart
select vdisk file="C:\WSL-Distros\…\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit
or
wsl --shutdown
optimize-vhd -Path C:\WSL-Distros\…\ext4.vhdx -Mode full
Go to list of users who liked
More than 3 years have passed since last update.
wsl --shutdown
diskpart
# open window Diskpart
select vdisk file="C:\WSL-Distros\…\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit
or
wsl --shutdown
optimize-vhd -Path C:\WSL-Distros\…\ext4.vhdx -Mode full
Register as a new user and use Qiita more conveniently
Go to list of users who liked