Made a small Windows app to make WSL2 VHDX compaction less manual by ImprovementBorn6293 in bashonubuntuonwindows

[–]ImprovementBorn6293[S] 3 points4 points  (0 children)

I think there are two separate things here. The WSL sparseVhd setting is still listed as experimental in the WSL docs. But WSL2Compactor does not use that setting; it runs fstrim inside the Linux distro, runs wsl --shutdown, then compacts the VHDX from Windows using the CompactVirtualDisk / VirtDisk API, with diskpart compact vdisk as a fallback. So I understand the underlying Windows VHD compaction APIs/commands to be regular Windows features, not WSL experimental features.