[{"data":1,"prerenderedAt":58},["ShallowReactive",2],{"blog-en-docker-disk-space-mac":3},{"meta":4,"html":14,"headings":15,"raw":57},{"title":5,"description":6,"topic":7,"date":8,"author":9,"icons":10},"Docker Desktop Using Too Much Space on Your Mac? How to Reclaim It","Find out what is inside Docker Desktop's virtual disk, clear build cache, images, and containers with Docker's own commands, and keep your volume data safe.","developer-cleanup","2026-10-29","WashBear Team",[11,12,13],"container","database","terminal","\u003Cp>On a Mac, Docker Desktop keeps images, containers, volumes, and build cache inside a single virtual disk file. In Finder you only see an ever-growing \u003Ccode>Docker.raw\u003C\u002Fcode>, with no hint of what is inside. The key to reclaiming space is to sort things out inside Docker first, separating cache you can rebuild from data you need, and then clean up with Docker&#39;s own commands instead of touching that file.\u003C\u002Fp>\n\u003Ch2 id=\"where-docker-stores-data\">\u003Ca class=\"heading-anchor\" href=\"#where-docker-stores-data\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Where Docker&#39;s space goes\u003C\u002Fh2>\n\u003Cp>Docker Desktop runs containers in a lightweight virtual machine. By default the VM&#39;s disk is the file below, and \u003Cstrong>Settings → Resources → Advanced\u003C\u002Fstrong> shows its actual location. It is a sparse file: some tools, such as \u003Ccode>ls -l\u003C\u002Fcode>, report its maximum size, while \u003Ccode>du\u003C\u002Fcode> shows how much space it really uses.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\"># Actual space used by Docker&#39;s virtual disk\ndu -h ~\u002FLibrary\u002FContainers\u002Fcom.docker.docker\u002FData\u002Fvms\u002F0\u002Fdata\u002FDocker.raw\n# Usage inside Docker by type; Docker must be running\ndocker system df\n# Per-item details for images, containers, volumes, and build cache\ndocker system df -v\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Ccode>docker system df\u003C\u002Fcode> reports four rows: Images, Containers, Local Volumes, and Build Cache. The RECLAIMABLE column is Docker&#39;s estimate of what could be freed. Find the biggest row first, then decide where to start.\u003C\u002Fp>\n\u003Ch2 id=\"safe-vs-risky\">\u003Ca class=\"heading-anchor\" href=\"#safe-vs-risky\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>What is safe to delete, and what needs care\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Type\u003C\u002Fth>\u003Cth>What it is\u003C\u002Fth>\u003Cth>Can you delete it?\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Build cache\u003C\u002Ftd>\u003Ctd>Layers and intermediate results left by \u003Ccode>docker build\u003C\u002Fcode>\u003C\u002Ftd>\u003Ctd>Yes; the next build is slower and may download dependencies again\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Dangling images\u003C\u002Ftd>\u003Ctd>Old untagged layers that no other image references\u003C\u002Ftd>\u003Ctd>Yes\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Unused images\u003C\u002Ftd>\u003Ctd>Images no container currently uses\u003C\u002Ftd>\u003Ctd>Usually; pull them again when needed. Check first for images you built locally and never pushed\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Stopped containers\u003C\u002Ftd>\u003Ctd>Containers that stopped but were never removed\u003C\u002Ftd>\u003Ctd>Check first that they hold no files or state you need\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Volumes\u003C\u002Ftd>\u003Ctd>Persistent data such as databases and uploads\u003C\u002Ftd>\u003Ctd>Treat them as data; do not bulk-delete them to save space\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cdiv class=\"callout callout-warning\">\u003Cp class=\"callout-title\">Warning\u003C\u002Fp>\u003Cp>Do not delete or move \u003Ccode>Docker.raw\u003C\u002Fcode> directly, and do not lower the disk image&#39;s maximum size just to make the number smaller. According to the \u003Ca href=\"https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Ftroubleshoot-and-support\u002Ffaqs\u002Fmacfaqs\u002F\" target=\"_blank\" rel=\"noopener\">Docker Desktop documentation\u003C\u002Fa>, lowering the limit deletes the existing disk image along with all containers and images. To relocate it, change the location in settings rather than dragging the file in Finder.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003Ch2 id=\"manual-cleanup\">\u003Ca class=\"heading-anchor\" href=\"#manual-cleanup\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Reclaim space with commands\u003C\u002Fh2>\n\u003Cp>Run these commands while Docker is running. Without \u003Ccode>-f\u003C\u002Fcode>, Docker lists what it is about to remove and waits for your confirmation.\u003C\u002Fp>\n\u003Ch3 id=\"build-cache\">\u003Ca class=\"heading-anchor\" href=\"#build-cache\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Build cache\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-bash\"># Remove dangling build cache\ndocker builder prune\n# Remove all unused build cache\ndocker builder prune --all\n# Remove only unused build cache older than 7 days\ndocker builder prune --all --filter until=168h\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Build cache is usually the best place to start, because images, containers, and volumes are untouched. See the \u003Ca href=\"https:\u002F\u002Fdocs.docker.com\u002Freference\u002Fcli\u002Fdocker\u002Fbuilder\u002Fprune\u002F\" target=\"_blank\" rel=\"noopener\">docker builder prune reference\u003C\u002Fa> for more options.\u003C\u002Fp>\n\u003Ch3 id=\"images-and-containers\">\u003Ca class=\"heading-anchor\" href=\"#images-and-containers\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Images and stopped containers\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-bash\"># Remove all stopped containers\ndocker container prune\n# Remove dangling images\ndocker image prune\n# Remove every image no container uses; frees the most, but you pull again when needed\ndocker image prune -a\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3 id=\"volumes\">\u003Ca class=\"heading-anchor\" href=\"#volumes\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Volumes\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-bash\">docker volume ls\n# By default removes only unused anonymous volumes; named volumes are kept\ndocker volume prune\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Only \u003Ccode>--all\u003C\u002Fcode> also removes unused named volumes. Named volumes often hold database data, so check them one by one and back up when in doubt.\u003C\u002Fp>\n\u003Ch3 id=\"system-prune\">\u003Ca class=\"heading-anchor\" href=\"#system-prune\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>What a one-step cleanup covers\u003C\u002Fh3>\n\u003Cp>\u003Ccode>docker system prune\u003C\u002Fcode> removes stopped containers, unused networks, dangling images, and unused build cache in one go. Adding \u003Ccode>-a\u003C\u002Fcode> also removes every image without a container, and \u003Ccode>--volumes\u003C\u002Fcode> removes unused anonymous volumes. It is convenient but broad, so read the list Docker prints before you confirm.\u003C\u002Fp>\n\u003Ch3 id=\"check-disk-image\">\u003Ca class=\"heading-anchor\" href=\"#check-disk-image\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Confirm that your Mac actually got space back\u003C\u002Fh3>\n\u003Cp>After cleaning, run \u003Ccode>docker system df\u003C\u002Fcode> again and check \u003Ccode>Docker.raw\u003C\u002Fcode> with the \u003Ccode>du\u003C\u002Fcode> command above. Docker notes that returning space to macOS can take a few minutes. If Docker is already lean and your disk is still full, look at other folders next.\u003C\u002Fp>\n\u003Ch2 id=\"washbear\">\u003Ca class=\"heading-anchor\" href=\"#washbear\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Clean up with WashBear\u003C\u002Fh2>\n\u003Cp>WashBear&#39;s \u003Ca href=\"\u002Fen\u002Fdocs\u002Fdeep-clean\">Deep Cleanup\u003C\u002Fa> offers two Docker Desktop items under \u003Cstrong>Container caches\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Docker build cache\u003C\u002Fstrong>: during the scan, WashBear reads the build cache Docker reports as unused and not shared with an image, and estimates its size. Cleanup runs \u003Ccode>docker --context default builder prune --all --force\u003C\u002Fcode>; images, containers, networks, and volumes are kept. Docker must be running, otherwise the item does not appear, and \u003Cstrong>Smart recommendation\u003C\u002Fstrong> never preselects it. After cleanup, WashBear reads Docker&#39;s numbers again and reports the difference as the amount removed.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Docker Desktop old logs\u003C\u002Fstrong>: host and virtual machine diagnostic logs older than seven days. The item is marked \u003Cstrong>Low risk\u003C\u002Fstrong> and preselected by Smart recommendation. Docker Desktop must be closed first, and the last seven days of logs are kept.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cdiv class=\"callout callout-tip\">\u003Cp class=\"callout-title\">Tip\u003C\u002Fp>\u003Cp>These two items need Docker in opposite states, so handle them in two passes: clear the build cache while Docker is running, then quit Docker Desktop and clear the old logs.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003Cp>WashBear always uses the \u003Ccode>default\u003C\u002Fcode> context; it does not follow \u003Ccode>DOCKER_HOST\u003C\u002Fcode> or another context you switched to. Images, containers, volumes, \u003Ccode>Docker.raw\u003C\u002Fcode>, and custom Buildx builders are outside its scope, so manage those with the commands above. Cleanup takes effect immediately and cannot be undone, and the result is recorded in \u003Ca href=\"\u002Fen\u002Fdocs\u002Fgetting-started#history\">Operation History\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>Not sure whether Docker is what is filling your disk? Open the \u003Ccode>Containers\u003C\u002Fcode> folder in your Library with \u003Ca href=\"\u002Fen\u002Fdocs\u002Fdisk-analysis\">Disk Space Analysis\u003C\u002Fa> and see how big \u003Ccode>com.docker.docker\u003C\u002Fcode> is. To try it on your own Mac, \u003Ca href=\"\u002Fen\u002Fdownload\">download WashBear\u003C\u002Fa>; scanning and analysis never delete anything by themselves. The demo below uses sample data and is only illustrative.\u003C\u002Fp>\n\u003C!--demo:analysis-->\u003Ch2 id=\"faq\">\u003Ca class=\"heading-anchor\" href=\"#faq\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>FAQ\u003C\u002Fh2>\n\u003Ch3 id=\"faq-images\">\u003Ca class=\"heading-anchor\" href=\"#faq-images\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Will clearing build cache delete my images?\u003C\u002Fh3>\n\u003Cp>No. \u003Ccode>docker builder prune\u003C\u002Fcode> only touches build cache; images, containers, and volumes are kept. The cost is that your next build reruns steps that used to hit the cache.\u003C\u002Fp>\n\u003Ch3 id=\"faq-space-not-returned\">\u003Ca class=\"heading-anchor\" href=\"#faq-space-not-returned\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>Docker showed a lot of reclaimable space, so why did my free space barely change?\u003C\u002Fh3>\n\u003Cp>Returning space from the virtual disk to macOS takes a little while, so check again after a few minutes. Also, RECLAIMABLE is only an estimate; data still used by a container or shared with other objects is not removed.\u003C\u002Fp>\n\u003Ch3 id=\"faq-start-over\">\u003Ca class=\"heading-anchor\" href=\"#faq-start-over\" aria-hidden=\"true\" tabindex=\"-1\">#\u003C\u002Fa>How do I wipe everything and start over?\u003C\u002Fh3>\n\u003Cp>Open \u003Cstrong>Troubleshoot\u003C\u002Fstrong> from the Docker menu and use \u003Cstrong>Clean up data\u003C\u002Fstrong>. It resets the disk image and deletes every local container and image along with the data inside them, while keeping your settings. Use it only when you are sure you need none of your local Docker data.\u003C\u002Fp>\n",[16,20,23,26,30,33,36,39,42,45,48,51,54],{"depth":17,"id":18,"text":19},2,"where-docker-stores-data","Where Docker&#39;s space goes",{"depth":17,"id":21,"text":22},"safe-vs-risky","What is safe to delete, and what needs care",{"depth":17,"id":24,"text":25},"manual-cleanup","Reclaim space with commands",{"depth":27,"id":28,"text":29},3,"build-cache","Build cache",{"depth":27,"id":31,"text":32},"images-and-containers","Images and stopped containers",{"depth":27,"id":34,"text":35},"volumes","Volumes",{"depth":27,"id":37,"text":38},"system-prune","What a one-step cleanup covers",{"depth":27,"id":40,"text":41},"check-disk-image","Confirm that your Mac actually got space back",{"depth":17,"id":43,"text":44},"washbear","Clean up with WashBear",{"depth":17,"id":46,"text":47},"faq","FAQ",{"depth":27,"id":49,"text":50},"faq-images","Will clearing build cache delete my images?",{"depth":27,"id":52,"text":53},"faq-space-not-returned","Docker showed a lot of reclaimable space, so why did my free space barely change?",{"depth":27,"id":55,"text":56},"faq-start-over","How do I wipe everything and start over?","\nOn a Mac, Docker Desktop keeps images, containers, volumes, and build cache inside a single virtual disk file. In Finder you only see an ever-growing `Docker.raw`, with no hint of what is inside. The key to reclaiming space is to sort things out inside Docker first, separating cache you can rebuild from data you need, and then clean up with Docker's own commands instead of touching that file.\n\n## Where Docker's space goes {#where-docker-stores-data}\n\nDocker Desktop runs containers in a lightweight virtual machine. By default the VM's disk is the file below, and **Settings → Resources → Advanced** shows its actual location. It is a sparse file: some tools, such as `ls -l`, report its maximum size, while `du` shows how much space it really uses.\n\n```bash\n# Actual space used by Docker's virtual disk\ndu -h ~\u002FLibrary\u002FContainers\u002Fcom.docker.docker\u002FData\u002Fvms\u002F0\u002Fdata\u002FDocker.raw\n# Usage inside Docker by type; Docker must be running\ndocker system df\n# Per-item details for images, containers, volumes, and build cache\ndocker system df -v\n```\n\n`docker system df` reports four rows: Images, Containers, Local Volumes, and Build Cache. The RECLAIMABLE column is Docker's estimate of what could be freed. Find the biggest row first, then decide where to start.\n\n## What is safe to delete, and what needs care {#safe-vs-risky}\n\n| Type | What it is | Can you delete it? |\n| --- | --- | --- |\n| Build cache | Layers and intermediate results left by `docker build` | Yes; the next build is slower and may download dependencies again |\n| Dangling images | Old untagged layers that no other image references | Yes |\n| Unused images | Images no container currently uses | Usually; pull them again when needed. Check first for images you built locally and never pushed |\n| Stopped containers | Containers that stopped but were never removed | Check first that they hold no files or state you need |\n| Volumes | Persistent data such as databases and uploads | Treat them as data; do not bulk-delete them to save space |\n\n> [!WARNING]\n> Do not delete or move `Docker.raw` directly, and do not lower the disk image's maximum size just to make the number smaller. According to the [Docker Desktop documentation](https:\u002F\u002Fdocs.docker.com\u002Fdesktop\u002Ftroubleshoot-and-support\u002Ffaqs\u002Fmacfaqs\u002F), lowering the limit deletes the existing disk image along with all containers and images. To relocate it, change the location in settings rather than dragging the file in Finder.\n\n## Reclaim space with commands {#manual-cleanup}\n\nRun these commands while Docker is running. Without `-f`, Docker lists what it is about to remove and waits for your confirmation.\n\n### Build cache {#build-cache}\n\n```bash\n# Remove dangling build cache\ndocker builder prune\n# Remove all unused build cache\ndocker builder prune --all\n# Remove only unused build cache older than 7 days\ndocker builder prune --all --filter until=168h\n```\n\nBuild cache is usually the best place to start, because images, containers, and volumes are untouched. See the [docker builder prune reference](https:\u002F\u002Fdocs.docker.com\u002Freference\u002Fcli\u002Fdocker\u002Fbuilder\u002Fprune\u002F) for more options.\n\n### Images and stopped containers {#images-and-containers}\n\n```bash\n# Remove all stopped containers\ndocker container prune\n# Remove dangling images\ndocker image prune\n# Remove every image no container uses; frees the most, but you pull again when needed\ndocker image prune -a\n```\n\n### Volumes {#volumes}\n\n```bash\ndocker volume ls\n# By default removes only unused anonymous volumes; named volumes are kept\ndocker volume prune\n```\n\nOnly `--all` also removes unused named volumes. Named volumes often hold database data, so check them one by one and back up when in doubt.\n\n### What a one-step cleanup covers {#system-prune}\n\n`docker system prune` removes stopped containers, unused networks, dangling images, and unused build cache in one go. Adding `-a` also removes every image without a container, and `--volumes` removes unused anonymous volumes. It is convenient but broad, so read the list Docker prints before you confirm.\n\n### Confirm that your Mac actually got space back {#check-disk-image}\n\nAfter cleaning, run `docker system df` again and check `Docker.raw` with the `du` command above. Docker notes that returning space to macOS can take a few minutes. If Docker is already lean and your disk is still full, look at other folders next.\n\n## Clean up with WashBear {#washbear}\n\nWashBear's [Deep Cleanup](\u002Fdocs\u002Fdeep-clean) offers two Docker Desktop items under **Container caches**:\n\n- **Docker build cache**: during the scan, WashBear reads the build cache Docker reports as unused and not shared with an image, and estimates its size. Cleanup runs `docker --context default builder prune --all --force`; images, containers, networks, and volumes are kept. Docker must be running, otherwise the item does not appear, and **Smart recommendation** never preselects it. After cleanup, WashBear reads Docker's numbers again and reports the difference as the amount removed.\n- **Docker Desktop old logs**: host and virtual machine diagnostic logs older than seven days. The item is marked **Low risk** and preselected by Smart recommendation. Docker Desktop must be closed first, and the last seven days of logs are kept.\n\n> [!TIP]\n> These two items need Docker in opposite states, so handle them in two passes: clear the build cache while Docker is running, then quit Docker Desktop and clear the old logs.\n\nWashBear always uses the `default` context; it does not follow `DOCKER_HOST` or another context you switched to. Images, containers, volumes, `Docker.raw`, and custom Buildx builders are outside its scope, so manage those with the commands above. Cleanup takes effect immediately and cannot be undone, and the result is recorded in [Operation History](\u002Fdocs\u002Fgetting-started#history).\n\nNot sure whether Docker is what is filling your disk? Open the `Containers` folder in your Library with [Disk Space Analysis](\u002Fdocs\u002Fdisk-analysis) and see how big `com.docker.docker` is. To try it on your own Mac, [download WashBear](\u002Fdownload); scanning and analysis never delete anything by themselves. The demo below uses sample data and is only illustrative.\n\n::demo analysis\n\n## FAQ {#faq}\n\n### Will clearing build cache delete my images? {#faq-images}\n\nNo. `docker builder prune` only touches build cache; images, containers, and volumes are kept. The cost is that your next build reruns steps that used to hit the cache.\n\n### Docker showed a lot of reclaimable space, so why did my free space barely change? {#faq-space-not-returned}\n\nReturning space from the virtual disk to macOS takes a little while, so check again after a few minutes. Also, RECLAIMABLE is only an estimate; data still used by a container or shared with other objects is not removed.\n\n### How do I wipe everything and start over? {#faq-start-over}\n\nOpen **Troubleshoot** from the Docker menu and use **Clean up data**. It resets the disk image and deletes every local container and image along with the data inside them, while keeping your settings. Use it only when you are sure you need none of your local Docker data.\n",1793258439477]