How to remove docker installed using wget? [closed]

烂漫一生 提交于 2019-12-29 10:08:26

问题


I've installed docker following installation tutorial on docker.com, using wget https://get.docker.com/ | sh command. Now i need to remove it entirely. apt-get remove docker, apt-get --auto-remove docker, apt-get remove docker.io, apt-get --auto-remove docker.io or any other combination doesn't work, since I didn't install it using apt-get. Is there any way to remove docker faster than removing it by hand?

(I'm working on Ubuntu 14.04 if it makes any difference).


回答1:


The uninstallation step mentions:

sudo apt-get purge -y docker-engine
sudo apt-get autoremove -y --purge docker-engine
sudo apt-get autoclean

Note: chasmani adds in the comments:

I had to also add docker-ce, docker.io and docker to the first two lines to completely get rid of

sudo apt-get purge -y docker-engine docker docker.io docker-ce
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce

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

As Micah Smith adds in the comments:

You may (as I did) also need to remove runtime files such as /var/run/docker.sock.
Try find / -name '*docker*' to see all of these files. (This searches your entire filesystem, look in at least /var, /run, /etc separately if you prefer not to do this.)

Now, You have successfully deleted docker.



来源:https://stackoverflow.com/questions/31313497/how-to-remove-docker-installed-using-wget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!