Skip to content

Instantly share code, notes, and snippets.

@houtianze
Created March 4, 2018 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save houtianze/a05e1c06b6ea1510a419d18ebf274713 to your computer and use it in GitHub Desktop.
Save houtianze/a05e1c06b6ea1510a419d18ebf274713 to your computer and use it in GitHub Desktop.
Shrink docker.qcow2 (which can get verylarge) on macOS

docker/for-mac#371 (comment)

If you can remove all images/containers then:

Stop Docker.

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls |awk '{print $2}')
rm -rf ~/Library/Containers/com.docker.docker/Data/*

Start Docker, you have yours GB back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment