Skip to main content
amit4sun

2 years ago

Uninstall docker on Centos

Hi All,


I want to uninstall docker that is installed as part of the course? Anyone has any idea on how to do that ?. It seems there is no straight forward way on uninstalling it . Any suggestion would be of great help.

Image of
2 years ago
Hi Amit,

You may not have all of these components installed, but this command should remove Docker:

sudo yum remove docker docker-common docker-selinux docker-engine

That command won't remove the images and containers from your disk though; for that, you'll want to delete the contents of the /var/lib/docker directory.
Let me know if that doesn't work for you.
Image of
2 years ago
Keith is 100% correct, the only other item to add is if you added any custom configuration to your Docker installation, you may want to purge the /etc/docker directory as well.
Image of
2 years ago
Thank's @keiththomps  @tcox that helped.
Image of vishnuchittan
vishnuchittan
1 year ago
 @keiththomps Ifollowed your instructions, Still my system showing docker version

Image of
1 year ago
One moe thing, restart your servers. This will also clear the Docker virtual network interfaces.