To Uninstall Docker completely from Ubuntu machine
Method 1:
Method 1:
To completely uninstall Docker:
Step 1
dpkg -l | grep -i docker
To identify what installed the package you have:
Step 2
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 commands:
sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
You have removed Docker from the system completely.
Method 2:
I find it much easier to uninstall docker if it is installed with snap
. You simply do: (Source: Stackover flow)
sudo snap remove docker
and to delete all related files,sudo find / -name "*docker*" -exec `rm -rf` {} +Method 3:
sudo apt-get purge -y docker.io docker-ce sudo apt-get autoremove -y --purge docker.io docker-ce sudo apt-get autoclean sudo rm -rf /var/lib/docker sudo rm -rf /etc/docker sudo rm /etc/apparmor.d/docker sudo apt-get purge runc containerd docker.io docker-ce
this command to see if docker files are any where else:sudo find / -name '*docker*'
No comments:
Post a Comment