π³ How to Manually Install Docker on macOS (Plus Full Uninstall Script)


Docker is a cornerstone of modern development β whether you're building microservices, testing APIs, or working with containers. But sometimes, especially after messy upgrades or broken installs, you just want a clean start.
In this guide, weβll walk through:
β
How to completely uninstall Docker Desktop from macOS
β
How to manually install the latest official Docker build
β
Key setup tips and permission fixes on Apple Silicon and Intel Macs
π Why Manual Installation?
While brew install --cask docker
works well for many, sometimes:
Docker behaves erratically after OS updates
Permission issues block startup (
com.docker.vmnetd
)You want to install the official
.dmg
directlyYou need full control and a clean uninstall
Letβs do it the right way β clean, official, and verified.
π§Ή Step 1: Fully Uninstall Docker from macOS
Use the script below to wipe Docker Desktop, CLI binaries, config folders, and preferences.
𧨠docker-uninstall-clean.sh
#!/bin/bash
echo "π Checking for existing Docker installation..."
if command -v docker &> /dev/null; then
echo "π³ Docker is installed. Proceeding to fully uninstall..."
echo "π Quitting Docker Desktop..."
osascript -e 'quit app "Docker"'
sleep 3
echo "π§Ή Removing Docker binaries and system files..."
sudo rm -rf /Applications/Docker.app
sudo rm -rf ~/.docker
sudo rm -rf ~/Library/Containers/com.docker.docker
sudo rm -rf ~/Library/Group\ Containers/group.com.docker
sudo rm -rf ~/Library/Application\ Support/Docker*
sudo rm -rf ~/Library/Logs/Docker*
sudo rm -rf ~/Library/Preferences/com.docker.docker.plist
sudo rm -rf ~/Library/Saved\ Application\ State/com.electron.docker-frontend.savedState
sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/docker-credential-desktop
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -f /usr/local/bin/com.docker.cli
echo "β
Docker has been fully removed from your system."
else
echo "β
Docker is not installed."
fi
β To run on terminal:
chmod +x docker-uninstall-clean.sh
./docker-uninstall-clean.sh
πΎ Step 2: Manually Install Docker Desktop from Official Source
1. Download Docker Desktop for macOS
Go to the official Docker page:
π https://www.docker.com/products/docker-desktop
Choose your architecture:
Intel chip (older Macs)
Apple Silicon (M1/M2)
2. Install the App
Open the
.dmg
file you downloadedDrag the
Docker.app
into your/Applications
folderLaunch Docker from Spotlight or Applications
π Step 3: Fix Permissions on First Run
Depending on your macOS version, Docker may ask for:
Admin access to run background services
Network permissions for
com.docker.vmnetd
Full Disk Access for file sharing with containers
If you see a security block like:
"
com.docker.vmnetd
was blocked"
Go to:
System Settings β Privacy & Security β Allow
β Step 4: Verify Installation
Run the following in your terminal to confirm Docker is working:
docker --version
docker run hello-world
You should see:
Hello from Docker!
This message shows that your installation appears to be working correctly.
π‘ Bonus Tips
Check resource limits via Docker β Preferences β Resources
You can use
docker-compose
,Dockerfile
, and even Kubernetes out of the boxUse the
--platform
flag if you're running multi-arch containers (e.g.,--platform=linux/amd64
)
π― Conclusion
Installing Docker manually gives you peace of mind and helps avoid common edge cases like permission errors or upgrade failures. With the uninstall script and official installer, you now have a clean, stable Docker environment for local dev.
Subscribe to my newsletter
Read articles from Himanshu Pandey directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
