How to easily install and uninstall docker on MacOs
Install
To install Docker is easy. Download the .dmg
, open it, drag and drop the Docker app to Applications, then run Docker Desktop for Mac. Unfortunately, it sprawls gunk all over your Mac (see uninstall).
Uninstall
If Docker starts, you can use the Docker Desktop app to uninstall. If that doesn't work, you will have to dive into the command line. For a complete uninstall as of 27-Dec-2020, type the following into the terminal:
(Be aware, this removes any Docker virtual machines and images too!)
sudo rm -Rf /Applications/Docker.app
sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/com.docker.cli
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-compose-v1
sudo rm -f /usr/local/bin/docker-credential-desktop
sudo rm -f /usr/local/bin/docker-credential-ecr-login
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -f /usr/local/bin/hub-tool
sudo rm -f /usr/local/bin/hyperkit
sudo rm -f /usr/local/bin/kubectl.docker
sudo rm -f /usr/local/bin/vpnkit
sudo rm -Rf ~/.docker
sudo rm -Rf ~/Library/Containers/com.docker.docker
sudo rm -Rf ~/Library/Application\ Support/Docker\ Desktop
sudo rm -Rf ~/Library/Group\ Containers/group.com.docker
sudo rm -f ~/Library/HTTPStorages/com.docker.docker.binarycookies
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo rm -f /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -Rf ~/Library/Logs/Docker\ Desktop
sudo rm -Rf /usr/local/lib/docker
sudo rm -f ~/Library/Preferences/com.docker.docker.plist
sudo rm -Rf ~/Library/Saved\ Application\ State/com.electron.docker-frontend.savedState
sudo rm -f ~/Library/Preferences/com.electron.docker-frontend.plist
To Install:
- Go Here
- Click the "Get Docker" or "Get Docker Desktop for Mac (Stable)" button.
- Double-click the DMG
- Drag Docker into Applications
- Open Docker
- Open Terminal after install and docker will be available. Docker should auto-launch on subsequent startups and be available on command line.
To Uninstall:
- Click On Docker Icon
- Select Preferences
- Select Bug Icon for the Troubleshoot menu (Bomb Icon in older Docker UI)
- Select Uninstall