1,Kill掉Docker进程

ps -ef | grep docker
kill -9 pid

2,删除docker所在目录

rm -rf /etc/docker
rm -rf /run/docker
rm -rf /var/lib/dockershim
rm -rf /var/lib/docker

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

转载自:
只需三步,完美卸载Docker
https://blog.csdn.net/wangerrong/article/details/126750198

Logo

云原生社区为您提供最前沿的新闻资讯和知识内容

更多推荐