Remove local Docker images on macOS

Viewed 21327

I'm using Docker for Mac and for saving disk space I want to get rid of some unused local images. As far as I know the local files are stored in ~/Library/Containers/com.docker.docker.

But even if I remove all images and containers from docker the folder keeps it's size of some GB and not a single byte is released. The only option is to remove the com.docker.docker folder completely but this makes only sense if you want to remove all the data and not only the unused images. What am I doing wrong?

4 Answers
sudo docker system prune -af

Just simple put the command given above. It will delete all the image automatically.

Related