DEV Community

Cover image for How To Uninstall Docker and Docker Compose On Linux Mint
BiKodes
BiKodes

Posted on

8

How To Uninstall Docker and Docker Compose On Linux Mint

Step 1: Remove Docker Packages

Open a terminal and run the following command to list all installed Docker packages:

$ dpkg -l | grep -i docker

Enter fullscreen mode Exit fullscreen mode

This will show you a list of Docker-related packages installed on your system. Thereafter you can use the following command to remove those packages:

$ sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
Enter fullscreen mode Exit fullscreen mode

Step 2: Remove Docker Images, Containers, and Volumes

You must comprehend that removing Docker packages doesn't remove your Docker images, containers, and volumes. Therefore if you want to completely remove Docker, including all its data, run the following commands:

Caution: This will delete all your Docker data, including containers, images, and volumes. Make sure you have backed up any necessary data.

$ sudo rm -rf /var/lib/docker
Enter fullscreen mode Exit fullscreen mode

Step 3: Remove Docker Compose

If you have Docker Compose installed, you may want to remove it as well. Use the following command:

$ sudo rm /usr/local/bin/docker-compose
Enter fullscreen mode Exit fullscreen mode

Step 4: Remove Docker Group

By default, Docker adds your user to the "docker" group. If you want to remove this group, run the following command:

$ sudo groupdel docker
Enter fullscreen mode Exit fullscreen mode

Step 5: Verify Uninstallation

You can check if Docker has been completely removed by running the following command:

$ docker --version
Enter fullscreen mode Exit fullscreen mode

If Docker has been successfully uninstalled, this command should return a "command not found" or No such file or directory message.

That's it! Docker should now be uninstalled from your Linux Mint system.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay