1,删除docker所在目录
rm -rf /etc/docker
rm -rf /run/docker
rm -rf /var/lib/dockershim
rm -rf /var/lib/docker
2,Kill掉Docker进程
ps -ef | grep docker
kill -9 pid
3,卸载docker相关包
- 查看相关包
yum list installed | grep docker
- 把匹配到的包执行 yum remove 删除
yum remove containerd.io.x86_64
yum remove docker-ce.x86_64
yum remove docker-ce-cli.x86_64
yum remove docker-ce-rootless-extras.x86_64
yum remove docker-compose-plugin.x86_64
yum remove docker-scan-plugin.x86_64
4、查看docker是否卸载成功,为空就是卸载成功啦
docker version