Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Docker uninstall script
# Uninstall Script
if [ "${USER}" != "root" ]; then
echo "$0 must be run as root!"
exit 2
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.";;
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!"

This comment has been minimized.

Copy link

commented Nov 3, 2015

Very helpful! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.