First search for the installed docker installation package
[root@localhost ~]# yum list installed|grep docker
or use the following command
[root@localhost ~]# rpm -qa|grep docker docker.x86_64 2:1.12.6-16.el7.centos @extras docker-client.x86_64 2:1.12.6-16.el7.centos @extras docker-common.x86_64 2:1.12.6-16.el7.centos @extra
and then delete the installation package respectively
[root@localhost ~]#yum –y remove docker.x86_64 [root@localhost ~]#yum –y remove docker-client.x86_64 [root@localhost ~]#yum –y remove docker-common.x86_64
Then delete the docker image
[root@localhost ~]# rm -rf /var/lib/docker
Then check docker again to see if it has been successfully uninstalled.
[root@localhost ~]# rm -rf /var/lib/docker [root@localhost ~]#
If it is not found, it means that it has been successfully uninstalled.
Recommended tutorial: centos tutorial
The above is the detailed content of How to uninstall docker on centos. For more information, please follow other related articles on the PHP Chinese website!