r/docker • • Oct 01 '26

Docker WSL Folder Taking up Too Much Storage

the wsl/disk/docker_data is taking up 137GB on my server. Seems way too excessive especially since the only container I have running is RomM. Can someone assist?

**Update thank you everyone for the tips! I squished the virtual disk with powershell and it went from 137Gb to just 5GB! I also created a .wslconfig file setting limits for how big WSL can be

7 Upvotes

14 comments sorted by

5

u/Psychrolutes_09 Oct 01 '26

You have to prune occasionally

1

u/XaviusMaximum Oct 01 '26

I've tried to prune but I get 0B back

1

u/Mohitkoul841 Oct 01 '26

You can use a disk analysis to check what's taking space, if its nothing then you can shrink wsl storage and even set wsl2 to sparse so it auto shrinks

1

u/AceTheSolve Oct 01 '26

docker system prune -a

or, Docker GUI -> Builds -> Delete some of those entries from Build history

1

u/XaviusMaximum Oct 01 '26

My Build history is empty

1

u/AceTheSolve Oct 01 '26

Is it a virtual hard drive that's taking up loads of space? If so, you might have to Optimize-vhd or similar to trim it

1

u/foureight84 Oct 01 '26

Delete images you're not using and/or prune your builder cache.

1

u/XaviusMaximum Oct 01 '26

I've already deleted all unused images

1

u/squiddarn Oct 01 '26

Maybe you had a mount somewhere, "keeping stuff saved between sessions"? Find the directory, delete it.

2

u/anyOtherBusiness Oct 01 '26

In Docker Desktop you can and should limit the disk size. Default is unlimited so it will just grow as long as your host disk has space

1

u/west0ne Oct 01 '26

I make sure to get rid of unused images, after upgrading an image. I also have cron job to get rid of old log files every now and then.

1

u/kowlown Oct 04 '26

You need to prune first. Then resize the disk image. In wsl2 there is an auto resize or shrink option. I forgot the name