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

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐