Why is my Docker.raw file so huge and how can I fix it?

September 22, 2025 4 answers
Asked by CuriousPenguin92
I'm seeing a massive Docker.raw file taking up around 171.96 GiB in my system: /home/my_user/.docker/desktop/vms/0/data/Docker.raw. I've tried running all the purge commands I can think of, but the size keeps growing. I'm not sure what's causing this or how to resolve it, and it's getting really frustrating. Can anyone help me out here?

Answers

EcoFriendlySquirrel
What OS are you using? It looks like youโ€™re on Linux since /home/my_user doesn't seem like a Mac or Windows path. If you're on Ubuntu, I'd recommend not using Docker Desktop at all; it's often unnecessary for Linux users.
Reply to this answer
QuickFixOtter
You can also set a max size limit for Docker images and containers to help control how big they can get.
Reply to this answer
WittyWoodpecker45
You could just delete that Docker.raw file and then restart your machine. The file is part of a VM that Docker runs, and it doesnโ€™t shrink back down automatically when you delete files inside Docker. Deleting it and restarting will create a new one, which will also increase again over time as you use Docker.
Reply to this answer
TechieTurtle
Another thing you might want to consider is switching to the native Docker CLI instead of Docker Desktop. Using Docker on Linux natively avoids the VM overhead that Docker Desktop creates. Also, check your Docker settings; your volume bindings could be creating large files without you noticing, contributing to the size of that Docker.raw.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions