Created
September 27, 2023 22:08
-
-
Save davidisnotnull/b0033a4990c3d80e17db37810eb971c7 to your computer and use it in GitHub Desktop.
Compress docker vhdx using diskpart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wsl --shutdown | |
diskpart | |
//if you haven't moved the vhd, then it should be here by default | |
select vdisk file="C:\Users\[YourLocalUserName]\AppData\Local\Docker\wsl\data\ext4.vhdx" | |
attach vdisk readonly | |
compact vdisk //this might take a while | |
detach vdisk | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment