We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Nikhil • 1 year ago

Thanks. I think the docker image for sending commands will do the trick. But, I do not have Optimize-VHD. And stay strong Brant to move past these tough times. Look at your doing, you are paying back for what you did. Tough, but best taken in.

Nikhil • 1 year ago

Attempted using diskpart as Gemini suggested. Steps for the same here: https://g.co/gemini/share/4...
Got, ~1.75-2GB back. ~5.5GB still under siege, not sure why.

Eric Trenkel • 3 years ago

Thanks for this article! Really helped me out as my WSL ext4 file was already 70GB+

Luka Cvetinovic • 4 years ago

Hi Brant, thanks for the article. I managed to get my disk space back with "Clean / Purge data" button with is located under "Troubleshoot" (bug icon) page.

It such a shame that I'm also losing current images/container/volumes while doing that, but at least now I can have my disk space back.

I found this to be the fastest and easiest thing to do. Of course, that will only work for people which are not afraid of losing volumes in the process.

https://uploads.disquscdn.c...

EDIT: I tried to have a few failing builds with docker-compose. After I got a few GBs wasted on ext4 I powered off Docker Desktop and tried with Optimize-VHD -Path ${env:LOCALAPPDATA}\Docker\wsl\data\ext4.vhdx -Mode Full. And the good news is it's working!

So now I'm pretty sure there is no need to Clean / Purge data if your goal is to just get back the wasted memory (wasted by failed builds).

I hope this helps someone :)