# 查询是否安装过 curl
which curl
# 查询是否安装过 docker
which docker
# 1. 删除软件以及安装时自动安装的所有包
sudo apt-get autoremove docker docker-ce docker-engine docker.io containerd runc -y
sudo 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相关插件
sudo apt remove (--purge docker-ce -y)
sudo apt-get autoremove (docker-ce-* -y)
sudo apt remove docker*
sudo apt-get autoremove docker*
# 4. 删除docker的相关配置&目录
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo rm -rf /var/run/docker*
sudo rm -rf /etc/systemd/system/docker.service.d
# 5. 确认docker卸载完毕
docker --version
which docker
xiuno建站一站式服务QQ:312215120
游客您好,
登录 或
注册 后即可发表更精彩的回复!