Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove docker completely from ubuntu 14.04

I installed Docker on Ubuntu a while back but when I tried to remove, the Docker still exists in the system. I followed this https://stackoverflow.com/a/31313851/2340159 but didn't work.

like image 795
VithuBati Avatar asked Jun 26 '17 13:06

VithuBati


People also ask

How do I remove docker from WSL?

Uninstall Docker Desktop (the two referenced docker-desktop. * instances will be removed) Optional, but recommended: Reboot Windows, or at least wsl --shutdown. Install Docker Engine in the Ubuntu instance per the normal instructions.


1 Answers

Probably your problem is that for Docker that has been installed from default Ubuntu repository, the package name is docker.io

Or package name may be something like docker-ce. Try running

dpkg -l | grep -i docker 

to identify what installed package you have

So you need to change package name in commands from https://stackoverflow.com/a/31313851/2340159 to match package name. For example, for docker.io it would be:

sudo apt-get purge -y docker.io sudo apt-get autoremove -y --purge docker.io sudo apt-get autoclean 

It adds:

The above commands will not remove images, containers, volumes, or user created configuration files on your host. If you wish to delete all images, containers, and volumes run the following command:

sudo rm -rf /var/lib/docker 

Remove docker from apparmor.d:

sudo rm /etc/apparmor.d/docker 

Remove docker group:

sudo groupdel docker 
like image 137
Dmitriusan Avatar answered Sep 20 '22 02:09

Dmitriusan