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

Himanshu PandeyHimanshu Pandey
3 min read

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 directly

  • You 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 downloaded

  • Drag the Docker.app into your /Applications folder

  • Launch 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 box

  • Use 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.

0
Subscribe to my newsletter

Read articles from Himanshu Pandey directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Himanshu Pandey
Himanshu Pandey