'How to uninstall Docker completely from a Mac?
I would like to remove the Docker toolbox completely from my Mac. I tried to remove Docker from the /Applications folder, but it didn't work out.
Solution 1:[1]
Start Docker. Go to the Docker Preferences from its menu bar icon. Within there is a 'Power Button' icon labeled "Reset". Click on that and then click the "Uninstall" button.
Solution 2:[2]
To uninstall Docker Toolbox from Mac, first simply download the following Docker Toolbox Uninstall Shell Script to your local machine.
Use the Terminal application on your Mac (i.e. Press CMD+Space to open Spotlight Search and enter keyword "Terminal") to change into the directory it was downloaded into (i.e. cd ~/Downloads), and then execute the file with sudo bash uninstall.sh.
Solution 3:[3]
I realize this question is old enough that it refers to Docker Toolbox instead of Docker Desktop. My response is in regards to Docker Desktop, the latest as of this answer.
You have two ways: Command Line or GUI.
Via command line you execute the following command:
$ /Applications/Docker.app/Contents/MacOS/Docker --uninstall
The command line should bring up something like this:
Docker is running, exiting... Docker uninstalled successfully. You can move the Docker application to the trash.
- With the GUI, open the Troubleshooting option and then choose Uninstall.
Solution 4:[4]
Remove all Docker Machine VMs:
docker-machine rm -f $(docker-machine ls -q);
Remove the application:
rm -rf /Applications/Docker.app
Remove local config:
rm -rf ~/.docker
Remove 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
Remove boot2docker.iso:
rm -rf /usr/local/share/boot2docker
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
Solution 5:[5]
To uninstall Docker
This article from 2014 lists all directories and binaries in detail that you need to remove to delete the installation completely:
https://therealmarv.com/how-to-fully-uninstall-the-offical-docker-os-x-installation/
Includes boot2docker.
Of course, you probably find a lot by just typing "docker" into the finder search box. The applications themselves can be removed by deleting the /Applications/Docker folder.
To uninstall VirtualBox
- download the *.dmg of VirtualBox for your version if you don't have it anymore
- click on the uninstall tool in that dmg
Solution 6:[6]
There is an official uninstall script:
https://github.com/boot2docker/osx-installer/blob/master/uninstall.sh
I used it successfully by entering the commands one at a time in the command line.
Solution 7:[7]
It seems all the answers are dated. As of 2022, there's a section of the docs dedicated to this: https://docs.docker.com/desktop/mac/install/#uninstall-docker-desktop
Quoting:
To uninstall Docker Desktop from your Mac:
- From the Docker menu, select Troubleshoot and then select Uninstall.
- Click Uninstall to confirm your selection.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Michael Innes |
| Solution 2 | J. Scott Elblein |
| Solution 3 | RobMac |
| Solution 4 | ruarl |
| Solution 5 | |
| Solution 6 | rep |
| Solution 7 | houcros |

