Skip to content

Instantly share code, notes, and snippets.

@cappert
Created June 27, 2016 21:01
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 cappert/7aebace68f7d40cbafa1bd27b8c54b2f to your computer and use it in GitHub Desktop.
Save cappert/7aebace68f7d40cbafa1bd27b8c54b2f to your computer and use it in GitHub Desktop.
;; https://github.com/docker/toolbox/blob/e24e33ea2f3f2c655fc4d07a671bd5f31ddfd95f/osx/uninstall.sh
#!/bin/bash
# Uninstall Script
if [ "${USER}" != "root" ]; then
echo "$0 must be run as root!"
exit 2
fi
while true; do
read -p "Remove all Docker Machine VMs? (Y/N): " yn
case $yn in
[Yy]* ) docker-machine rm -f $(docker-machine ls -q); break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no."; exit 1;;
esac
done
echo "Removing Applications..."
rm -rf /Applications/Docker
echo "Removing docker binaries..."
rm -f /usr/local/bin/docker
rm -f /usr/local/bin/docker-machine
rm -r /usr/local/bin/docker-machine-driver*
rm -f /usr/local/bin/docker-compose
echo "Removing boot2docker.iso"
rm -rf /usr/local/share/boot2docker
echo "Forget packages"
pkgutil --forget io.docker.pkg.docker
pkgutil --forget io.docker.pkg.dockercompose
pkgutil --forget io.docker.pkg.dockermachine
pkgutil --forget io.boot2dockeriso.pkg.boot2dockeriso
echo "All Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment