1.删除docker所在目录
rm -rf /etc/docker
rm -rf /run/docker
rm -rf /var/lib/dockershim
rm -rf /var/lib/docker
2.卸载docker相关包
- 输入如下命令查看相关包
yum list installed | grep docker
- 把匹配到的包执行 yum remove 删除
yum remove \
containerd.io.x86_64 \
docker-ce.x86_64 \
docker-ce-cli.x86_64 \
docker-ce-rootless-extras.x86_64 \
docker-compose-plugin.x86_64 \
docker-scan-plugin.x86_64
3.查看docker
docker version