查询是否安装过 curl
which curl
查询是否安装过 docker
which docker
1. 删除软件以及安装时自动安装的所有包
apt-get autoremove docker docker-ce docker-engine docker.io containerd runc -y apt-get autoremove docker docker-ce docker-engine docker.io containerd runc
2. 查看docker中其他没有卸载的包
dpkg -l | grep docker
如下:
$ dpkg -l | grep docker rc docker-ce 5:20.10.17~3-0~ubuntu-focal amd64 Docker: the open-source application container engine ii docker-ce-rootless-extras 5:20.10.17~3-0~ubuntu-focal amd64 Rootless support for Docker. ii docker-compose-plugin 2.6.0~ubuntu-focal amd64 Docker Compose (V2) plugin for the Docker CLI. ii docker-scan-plugin 0.17.0~ubuntu-focal amd64 Docker scan cli plugin. rc docker.io 20.10.12-0ubuntu2~20.04.1 amd64 Linux container runtime rc nvidia-docker2 2.11.0-1 all nvidia-docker CLI wrapper
3. 卸载没有删除的docker相关插件
apt remove (--purge docker-ce -y) apt-get autoremove (docker-ce-* -y) apt remove docker* apt-get autoremove docker*
4. 删除docker的相关配置&目录
rm -rf /var/lib/docker rm -rf /var/lib/containerd rm -rf /var/run/docker* rm -rf /etc/systemd/system/docker.service.d
5. 确认docker卸载完毕
docker --version which docker
http://www.virplus.com/thread-1575.htm
转载请注明:11月前 于 VirPlus 发表