Skip to main content

House Keeping with Docker Desktop

Submitted by daniel on

For a while now I have been struggling with space on my Mac fitted with a 500GB SSD drive. Looking at my resources I can see over 200GB is allocated to System Data. Digging a little deeper into this I can also see that a Docker Container accounts for 60GB of this space. 

Image
Docker Disk Space

This corresponds with the container size that is set in Docker Desktop:

Image
Docker Desktop Settings

So one option to reclaim some disk space might well be to reduce the Disk image size available from within Docker itself.

Unused Disk Images

Another option is simply to remove or delete any unused images. 

Image
Docker - remove images

Again from within docker we are give an overview of all the available local images, both in use and unused. As you can see from the screenshot the unused images take up a considerable amount of space on your local hardrive. My advice would be to simply remove any that are not in use.

By deleting and unused images I was quickly able to free up around 30GB.

Image
Docker Images - Cleaned

Docker Sytem Prune

Of course you can always use the docker system prune command which also removes any dangling and unused images, but this also removes any stopped containers, which is not really what I want to do.

https://docs.docker.com/engine/reference/commandline/system_prune/

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.