Created
August 29, 2015 15:11
-
-
Save rtfpessoa/99c426086ff92debb010 to your computer and use it in GitHub Desktop.
Docker uninstall script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 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.";; | |
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 -f /usr/local/bin/docker-compose | |
echo "Removing boot2docker.iso and socket files..." | |
rm -rf ~/.docker | |
rm -rf /usr/local/share/boot2docker | |
echo "All Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very helpful! Thanks.