close
close

uninstall docker mac

2 min read 02-10-2024
uninstall docker mac

How to Uninstall Docker on Your Mac: A Step-by-Step Guide

Docker is a powerful tool for developers and system administrators, allowing for the creation and deployment of containerized applications. However, there might be situations where you need to remove Docker from your Mac. This article provides a comprehensive guide on uninstalling Docker Desktop for Mac, ensuring a clean removal of all associated components.

Understanding the Problem:

Many users face challenges when trying to uninstall Docker on their Mac, often encountering residual files or incomplete removal. This leads to confusion and potential errors. This article aims to solve this problem by providing a clear, step-by-step guide for a complete and hassle-free uninstallation process.

Steps to Uninstall Docker Desktop for Mac:

  1. Close all Docker applications: Ensure all Docker-related applications, including Docker Desktop, are closed.
  2. Quit Docker Desktop: If Docker Desktop is running, right-click its icon in the menu bar and select "Quit Docker Desktop."
  3. Navigate to the Applications folder: Open Finder and navigate to "Applications."
  4. Locate Docker Desktop: Find "Docker Desktop" in the Applications folder.
  5. Drag Docker Desktop to the Trash: Drag the "Docker Desktop" application icon to the Trash.
  6. Empty the Trash: Right-click the Trash icon and select "Empty Trash."
  7. Uninstall Docker CLI: If you've used the Docker CLI, uninstall it using the following command in your terminal:
    sudo rm /usr/local/bin/docker
    sudo rm /usr/local/bin/docker-compose
    
  8. Remove Docker related files: Navigate to the following directory in your terminal:
    /Applications/Docker.app/Contents/Resources/
    
    Delete the "com.docker.vmnetd" and "com.docker.hyperkit" folders.
  9. Remove the Docker VM: Open "Activity Monitor" (search for it using Spotlight). Find "Docker Desktop" and quit it if it's still running. Then, search for "VBoxManage" (VirtualBox) and terminate it. Finally, locate "hyperkit" and force quit it.
  10. Restart your Mac: For a complete removal, restart your Mac.

Additional Tips:

  • Check for residual files: After the uninstallation, you can use a search tool like "Find Any File" to check for any remaining files related to Docker.
  • Remove preferences: If you encounter issues with removing all files, you can manually delete Docker's preferences in the following directory:
    ~/Library/Preferences/com.docker.docker.plist
    
  • Verify complete removal: After the uninstallation, open your terminal and try running the docker command. If the command is not recognized, you have successfully uninstalled Docker.

Conclusion:

Uninstalling Docker Desktop for Mac requires a few steps to ensure a complete removal. This comprehensive guide provides a detailed procedure, ensuring that you can successfully remove Docker from your Mac without any lingering issues. Remember to restart your Mac after the process to complete the uninstallation and clear any remaining cache.

Useful Resources:

By following these steps, you can effectively uninstall Docker from your Mac and ensure a clean and functional system.