如何删除使用 wget 安装的 docker?
How to remove docker installed using wget?
我已经按照 docker.com 上的安装教程使用 wget https://get.docker.com/ | sh
命令安装了 docker。
现在我需要完全删除它。 apt-get remove docker
、apt-get --auto-remove docker
、apt-get remove docker.io
、apt-get --auto-remove docker.io
或任何其他组合都不起作用,因为我没有使用 apt-get 安装它。有什么方法可以比手动移除更快 docker 吗?
(我正在研究 Ubuntu 14.04,如果它有任何不同的话)。
sudo apt-get purge -y docker-engine
sudo apt-get autoremove -y --purge docker-engine
sudo apt-get autoclean
注:chasmani adds :
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
它补充说:
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
如Micah Smith adds :
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.)
现在,您已成功删除docker。
我已经按照 docker.com 上的安装教程使用 wget https://get.docker.com/ | sh
命令安装了 docker。
现在我需要完全删除它。 apt-get remove docker
、apt-get --auto-remove docker
、apt-get remove docker.io
、apt-get --auto-remove docker.io
或任何其他组合都不起作用,因为我没有使用 apt-get 安装它。有什么方法可以比手动移除更快 docker 吗?
(我正在研究 Ubuntu 14.04,如果它有任何不同的话)。
sudo apt-get purge -y docker-engine
sudo apt-get autoremove -y --purge docker-engine
sudo apt-get autoclean
注:chasmani adds
I had to also add
docker-ce
,docker.io
anddocker
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
它补充说:
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
如Micah Smith adds
You may (as I did) also need to remove runtime files such as
/var/run/docker.sock
.
Tryfind / -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.)
现在,您已成功删除docker。