Digital Marketing

How to Uninstall Docker? The Complete Method for Windows, Ubuntu, and Mac

By Steven, on December 5, 2024 - 3 min read

Docker is an essential tool for developers and system administrators who want to manage multi-container applications. However, whether it’s to solve problems, free up disk space, or simply start with a clean installation, it may be necessary to uninstall Docker from your device.

You want to uninstall Docker from your computer but don’t know how? Don’t worry, with the right method, there’s nothing very complicated. And it just so happens that Debugbar has prepared a little step-by-step tutorial to uninstall Docker on Windows, Mac, and Ubuntu.

Uninstall Docker on Windows in a few clicks

On Windows, uninstalling Docker is done through the control panel:

  1. Go to Control Panel > Programs > Programs and Features.
programs uninstall
program features 1
  1. Right-click on Docker Desktop in the list of installed applications.
  2. Select Uninstall and follow the on-screen instructions.
remove docker windows
  1. Once the uninstallation is complete, delete the C:\ProgramData\DockerDesktop folder if it still exists.
  2. Restart your PC to finalize the uninstallation.

And there you have it, no more trace of Docker on your Windows device! If you had installed Docker Toolbox (the old method of installing Docker on Windows), you’ll need to uninstall it separately following exactly the same method.

Clean up by uninstalling Docker on Mac

The procedure to get rid of Docker on a Mac is a bit more manual but still very simple:

  1. Quit Docker Desktop if it is running.
  2. Open the Finder and click on the “Applications” tab in the left column.
  3. Find and drag the Docker icon from your Applications folder to the trash.

drag docker bin
drop docker bin

  1. Launch the quick search window: “Finder > Go > Go to Folder”.

finder aller

  1. Type: ~/Library/ then press Enter.
library finder
  1. In the search field of the window, type “Docker”. All remaining Docker files will then appear.

search docker files finder

  1. Make sure they are Docker files, then delete them (right-click > Delete or Select > Drag and drop into the trash).
  2. Empty the trash and restart your Mac

After these steps, no Docker components will remain on your system. If needed, you can also manually delete the com.docker.vmnetd.plist file in ~/Library/LaunchAgents and the ~/Library/Group Containers/group.com.docker folder.

Uninstall Docker from Ubuntu from A to Z

The complete uninstallation of Docker Engine on a Linux distribution like Ubuntu requires being a bit more thorough. Here’s how to do it step by step:

  1. Launch the command prompt and stop the Docker daemon with : sudo systemctl stop docker
  2. Remove all installed Docker packages by using the package manager:
  • sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
  • sudo apt-get autoremove -y –purge docker-engine docker docker.io docker-ce docker-ce-cli  
  1. Remove Docker images, containers, volumes, and networks:
  • sudo rm -rf /var/lib/docker /etc/docker
  • sudo rm /etc/apparmor.d/docker
  • sudo groupdel docker
  • sudo rm -rf /var/run/docker.sock
  • sudo rm -rf /var/lib/containerd
  1. Remove any remaining Docker configuration and data files:
  • sudo find / -name “*docker*” -exec rm -rf {} \;

After all these steps, your Ubuntu system will be completely purged of Docker and all its components. Feel free to restart your machine to finalize the uninstallation.

Clean up your system by uninstalling Docker Compose

If you were using Docker Compose, you’ll also need to uninstall it properly. Here’s how to remove it on Linux:

  • sudo rm /usr/local/bin/docker-compose
  • sudo find / -name “*docker-compose*” -delete

On Mac and Windows, Docker Compose is integrated with Docker Desktop. Its uninstallation will therefore be done at the same time as Docker Desktop.

Uninstall tools associated with Docker

In addition to Docker itself, you may have installed other tools from the Docker ecosystem that you’ll also need to uninstall if you want to start fresh:

  • Docker Machine: sudo rm $(which docker-machine)
  • Kitematic: Drag the app from /Applications to the trash on Mac. On Windows, go through the control panel.
  • Docker Toolbox: Use the uninstaller provided with the installer.

Don’t forget to delete any images, Dockerfiles, and configuration files that you may have downloaded or created manually on your machine.

By carefully following the steps above according to your OS, you can completely uninstall Docker and all its components from your system. This clean uninstallation will allow you to start on a good basis if you decide to reinstall Docker later or migrate to another containerization solution.

Steven