WSL Disk Space Compression
Timeline
2025-12-29
init
Locate the .vhdx File Disk Path
Replace distribution-name with the distribution name shown by wsl -l -v:
1 | wsl -l -v |
Compress the Disk
Shut down WSL before compressing:
1 | wsl --shutdown |
Then launch diskpart:
1 | diskpart |
A new command line window will pop up. Enter the following commands in order, replacing the file value with the path obtained in the previous step:
1 | # Select the target disk file |
References
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments