How to Remove Docker Completely from Mac Using Terminal

How you can delete docker completely from your computer using the mac terminal

Picture of Nsikak Imoh, author of Macsika Blog
Plain background with the text How to Remove Docker Completely from Mac Using Terminal
Plain background with the text How to Remove Docker Completely from Mac Using Terminal

Table of Content

Docker is a very useful software for containerizing our application and services.

However, it comes with its con of consuming a lot of space and if not properly checked, you may have a lot of unused images and containers clogging up your storage real estate.

This gets particular worse in MacOS given that the files may be completely hidden in a plethora of system directories, making it difficult to remove docker by simply uninstalling it.

Here is how you can delete docker completely from your computer using the mac terminal:

Open a new Mac terminal window and run the commands one after the other.

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/Caches/com.docker.docker
sudo rm -rf /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo rm -rf /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -rf /usr/local/lib/docker
sudo rm -rf ~/Library/Application Support/Docker Desktop
sudo rm -rf ~/Library/Preferences/com.docker.docker.plist
sudo rm -rf ~/Library/Saved Application State/com.electron.docker-frontend.savedState
sudo rm -rf ~/Library/Group Containers/group.com.docker
sudo rm -rf ~/Library/Logs/Docker Desktop
sudo rm -rf ~/Library/Preferences/com.electron.docker-frontend.plist
sudo rm -rf ~/Library/Cookies/com.docker.docker.binarycookies
Highlighted code sample.

And that's all there is to it.

If you learned from this tutorial, or it helped you in any way, please consider sharing and subscribing to our newsletter.

Connect with me.

Need an engineer on your team to grease an idea, build a great product, grow a business or just sip tea and share a laugh?