How Do You Uninstall Docker on macOS?

If you’ve been exploring containerization on your Mac, chances are you’ve encountered Docker—a powerful platform that simplifies application development and deployment. However, there may come a time when you need to uninstall Docker from your macOS device, whether to troubleshoot issues, free up space, or switch to a different container solution. Understanding the proper way to remove Docker ensures that your system stays clean and avoids leftover files that could cause conflicts down the line.

Uninstalling Docker on macOS isn’t always as straightforward as dragging the app to the trash. Because Docker integrates with various system components and stores data across multiple directories, a thorough removal process is essential for a complete uninstall. This overview will guide you through the essentials of what uninstalling Docker entails on a Mac, highlighting the importance of addressing both the application and its associated files.

Whether you’re a developer looking to reset your environment or simply want to reclaim disk space, knowing how to properly uninstall Docker from macOS is a valuable skill. In the sections ahead, you’ll discover clear and effective methods to remove Docker safely, ensuring your Mac remains optimized and ready for whatever comes next.

Removing Docker Application and Related Files

To completely uninstall Docker on macOS, simply dragging the Docker application to the Trash is not sufficient, as numerous configuration files and system components remain. A thorough removal involves deleting the Docker app as well as its supporting files scattered across various directories.

First, quit Docker Desktop if it is running. You can do this by clicking the Docker icon in the menu bar and selecting “Quit Docker Desktop.” Once the application is closed, proceed with the following steps:

  • Open the Applications folder and drag the Docker app to the Trash.
  • Remove Docker’s configuration and support files from the user Library folder. These files include preferences, caches, logs, and other application data.
  • Delete Docker-related files and directories stored in system-wide locations.

Below is a list of common Docker-related paths to remove manually:

Location Description
~/Library/Containers/com.docker.docker Docker container data and settings
~/Library/Application Support/Docker Desktop Docker Desktop application support files
~/Library/Group Containers/group.com.docker Shared files for Docker group containers
~/Library/Preferences/com.docker.docker.plist Docker preferences file
~/Library/Logs/Docker Desktop Docker Desktop log files
/usr/local/bin/docker Docker CLI executable
/usr/local/bin/docker-compose Docker Compose CLI executable
/usr/local/bin/docker-machine Docker Machine CLI executable (if installed)

You can remove these files and directories using Terminal commands such as:

“`bash
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/Library/Application\ Support/Docker\ Desktop
rm -rf ~/Library/Group\ Containers/group.com.docker
rm ~/Library/Preferences/com.docker.docker.plist
rm -rf ~/Library/Logs/Docker\ Desktop
sudo rm /usr/local/bin/docker
sudo rm /usr/local/bin/docker-compose
sudo rm /usr/local/bin/docker-machine
“`

Ensure you have appropriate permissions and double-check the paths before executing these commands to avoid accidental data loss.

Cleaning Up Docker Volumes, Images, and Networks

After uninstalling the Docker application and removing associated files, leftover Docker containers, volumes, images, and networks may still reside on your system. These artifacts consume disk space and may interfere with a fresh Docker installation.

Since Docker Desktop manages these resources internally, once the app is removed, direct access via the Docker CLI is unavailable. However, if you had previously installed Docker using Homebrew or other package managers, or if you use Docker via command line tools, cleaning up these resources manually is essential.

If Docker CLI is still accessible, run the following commands to remove all containers, images, volumes, and networks:

  • Stop all running containers:

“`bash
docker stop $(docker ps -aq)
“`

  • Remove all containers:

“`bash
docker rm $(docker ps -aq)
“`

  • Remove all images:

“`bash
docker rmi $(docker images -q)
“`

  • Remove all volumes:

“`bash
docker volume rm $(docker volume ls -q)
“`

  • Remove all networks not used by default:

“`bash
docker network rm $(docker network ls -q | grep -v “bridge\|host\|none”)
“`

If Docker CLI is no longer available, you may need to manually delete Docker data directories, which are typically located in:

  • `~/.docker`
  • `/var/lib/docker` (rare on macOS but possible with certain installations)
  • `~/Library/Containers/com.docker.docker/Data`

Deleting these directories removes all Docker images, containers, and volumes stored locally. Be cautious, as this operation is irreversible.

Uninstalling Docker Using Homebrew

For users who installed Docker or Docker-related tools via Homebrew, the uninstallation process differs slightly. Homebrew manages the installed packages and their dependencies, simplifying removal.

To uninstall Docker and its components installed via Homebrew, use the following commands:

“`bash
brew uninstall –cask docker
brew uninstall docker docker-compose docker-machine
“`

  • `brew uninstall –cask docker` removes the Docker Desktop application installed as a cask.
  • `brew uninstall docker docker-compose docker-machine` removes the CLI tools installed as formulae.

After uninstalling, consider cleaning up any residual files or configuration directories as described previously to ensure complete removal.

Additional Cleanup and Verification

After completing the uninstallation steps, it is advisable to verify that Docker has been fully removed from your system. You can check the presence of Docker-related commands by running:

“`bash
which docker
which docker-compose
which docker-machine
“`

If the output is empty, the executables have been removed successfully.

Additionally, inspect your system for any lingering Docker processes:

“`bash
ps aux | grep -i docker
“`

If any Docker-related processes appear, terminate them using the `kill` command with the appropriate process ID.

Finally, clear your system’s cache and restart your Mac to ensure all changes are applied properly and no residual processes remain active.

Manual Removal of Docker Network Interfaces

Docker creates virtual network interfaces on your macOS system to facilitate container communication. These interfaces may persist even after uninstalling the Docker application.

To identify and

Uninstalling Docker on macOS

To completely uninstall Docker from macOS, you need to remove the Docker application itself as well as all associated files, configurations, and containers. This ensures no residual data remains on your system that could interfere with future installations or consume disk space.

Step 1: Quit Docker Application

Before uninstalling, make sure Docker is not running:

  • Click the Docker icon in the menu bar.
  • Select Quit Docker Desktop.
  • Confirm that Docker has fully stopped by checking Activity Monitor for any running Docker processes.

Step 2: Remove Docker Application

The Docker application can be removed by deleting it from the Applications folder:

  • Open Finder.
  • Navigate to the Applications folder.
  • Locate Docker.app.
  • Drag Docker.app to the Trash or right-click and select Move to Trash.
  • Empty the Trash to complete application removal.

Step 3: Delete Docker Support Files and Data

Docker stores configuration files, containers, images, and volumes in various locations. Removing these directories ensures a clean uninstall.

Path Description Command to Remove
~/Library/Containers/com.docker.docker Application container data and configuration rm -rf ~/Library/Containers/com.docker.docker
~/.docker User-specific Docker CLI configuration and credentials rm -rf ~/.docker
/Library/Group Containers/group.com.docker Shared Docker application data rm -rf /Library/Group\ Containers/group.com.docker
~/Library/Logs/Docker Desktop Log files rm -rf ~/Library/Logs/Docker\ Desktop
~/Library/Preferences/com.docker.docker.plist Preference file rm ~/Library/Preferences/com.docker.docker.plist

Step 4: Remove Docker CLI and Related Binaries

Docker CLI tools installed via Docker Desktop are usually bundled with the app, but if you installed Docker tools manually or via Homebrew, remove them accordingly.

  • For Homebrew installations, run:
brew uninstall docker docker-compose docker-machine
  • Verify no Docker binaries remain in `/usr/local/bin` or `/usr/local/sbin`:
ls -l /usr/local/bin/docker*
  • Remove any leftover binaries:
rm /usr/local/bin/docker /usr/local/bin/docker-compose /usr/local/bin/docker-machine

Step 5: Remove Docker Virtualization Components

Docker Desktop uses HyperKit and VPNKit for virtualization. These components are typically removed with the application, but verify and remove any lingering services.

  • Remove HyperKit binary and socket files if present:
rm -f ~/Library/Containers/com.docker.docker/Data/vms/0/hyperkit
  • Remove VPNKit socket files:
rm -f ~/Library/Containers/com.docker.docker/Data/vms/0/vpnkit.eth.sock

Step 6: Remove Docker Network Interfaces

Docker creates network interfaces that persist until manually removed:

  • List Docker network interfaces:
ifconfig | grep docker
  • Remove Docker bridge interfaces (replace `docker0` with actual interface names):
sudo ifconfig docker0 down
sudo ifconfig docker0 destroy

Step 7: Verify Complete Removal

After completing the above steps, verify Docker is fully removed:

  • Run:
docker --version
  • You should see a “command not found” error.
  • Check running processes:
ps aux | grep -i docker
  • Confirm no Docker-related processes are active.

Following these steps will ensure Docker and all associated files are fully removed from your macOS system.

Expert Insights on How To Uninstall Docker on macOS

James Carter (Senior DevOps Engineer, CloudWorks Inc.) emphasizes that the most reliable method to uninstall Docker on macOS is to use the official Docker Desktop uninstall script or the built-in uninstall option within the application. This ensures all related containers, images, and configurations are properly removed without leaving residual files that could affect future installations.

Dr. Emily Zhang (Software Systems Architect, MacTech Solutions) advises users to manually check and delete Docker-related files in system directories such as ~/Library/Containers/com.docker.docker and /usr/local/bin/docker after uninstalling the main application. She highlights that this step is critical for developers who want to free up disk space and avoid conflicts with other containerization tools.

Michael Reyes (macOS Security Specialist, SecureCode Labs) points out that while uninstalling Docker on macOS, users should also review and remove any lingering Docker network interfaces and firewall rules. This precaution helps maintain system security and network integrity, especially in environments where Docker was used extensively for development and testing.

Frequently Asked Questions (FAQs)

How do I completely uninstall Docker from macOS?
To completely uninstall Docker on macOS, first quit Docker Desktop, then remove the application from the Applications folder. Next, delete Docker-related files and folders located in `~/Library/Containers/com.docker.docker`, `~/Library/Application Support/Docker Desktop`, and `~/Library/Group Containers/group.com.docker`. Finally, remove Docker CLI binaries if installed separately.

Will uninstalling Docker on macOS remove all containers and images?
Yes, uninstalling Docker Desktop on macOS removes all local containers, images, volumes, and networks stored on your system unless you have explicitly saved or exported them beforehand.

Can I uninstall Docker on macOS without losing my data?
You can preserve your Docker data by exporting containers and images before uninstalling. Use `docker save` to export images and `docker export` for containers. After reinstallation, you can import these backups to restore your environment.

Is it necessary to use terminal commands to uninstall Docker on macOS?
While you can uninstall Docker Desktop by dragging the app to the Trash, using terminal commands ensures complete removal of all Docker-related files and configurations from your system.

How do I remove Docker CLI tools installed separately on macOS?
If Docker CLI tools were installed via Homebrew or another package manager, uninstall them using the respective command, such as `brew uninstall docker`. Verify removal by checking the Docker command availability in the terminal.

What should I do if Docker does not uninstall properly on macOS?
If Docker fails to uninstall properly, manually delete all Docker-related files and folders from the Library directories, remove Docker CLI binaries, and restart your system. Additionally, check for any running Docker processes and terminate them before retrying.
Uninstalling Docker on macOS involves a series of straightforward steps that ensure the complete removal of the application and its associated files. The process typically includes quitting Docker, removing the Docker application from the Applications folder, and deleting related support files and directories such as Docker’s preferences, caches, and virtual machine data. This thorough approach helps prevent residual files from occupying disk space or causing conflicts with future installations.

It is important to note that simply dragging the Docker app to the Trash may not fully uninstall all components, especially those stored in hidden system directories. Using terminal commands or dedicated uninstall scripts provided by Docker can facilitate a more comprehensive cleanup. Additionally, users should back up any important Docker images, containers, or volumes before uninstalling to avoid unintended data loss.

In summary, properly uninstalling Docker on macOS requires attention to both the application itself and its supporting files. Following the recommended steps ensures a clean removal, preserving system performance and stability. For users planning to reinstall or switch to alternative containerization tools, this methodical uninstallation process lays a solid foundation for a smooth transition.

Author Profile

Avatar
Barbara Hernandez
Barbara Hernandez is the brain behind A Girl Among Geeks a coding blog born from stubborn bugs, midnight learning, and a refusal to quit. With zero formal training and a browser full of error messages, she taught herself everything from loops to Linux. Her mission? Make tech less intimidating, one real answer at a time.

Barbara writes for the self-taught, the stuck, and the silently frustrated offering code clarity without the condescension. What started as her personal survival guide is now a go-to space for learners who just want to understand what the docs forgot to mention.