Question: I'm using [Docker for Mac](https://docs.docker.com/docker-for-mac/) Version 1.12.0-beta21 (build: 11019) on OS X 10.11.6. The container folder in `$HOME/Library/Containers/com.docker.docker` contains 3.1 GB of space. `docker images -a` however only shows one image which is 330 MB.

How can I clean up the container folder, so that it only contains the images I'm able to use?

Update
======

There is an open issue regarding this problem: <https://github.com/docker/for-mac/issues/371>

Answer: 
try:

```
docker system prune -a

```

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

> 
> Remove all unused containers, networks, images (both dangling and
>  unreferenced), and optionally, volumes.
> 
> 
>
Check the size with this command below:

```
du -h -d 1  ~/Library/Containers/com.docker.docker 

```

You can easily clean up running:

```
docker system prune -a

```

Or restarting the default settings on top bar to clean.

[![enter image description here](https://i.stack.imgur.com/uxKXp.png)](https://i.stack.imgur.com/uxKXp.png)

Or create a script like this link to don't lose the images.

<https://blog.mrtrustor.net/post/clean-docker-for-mac/>