即使按照教程操作,仍然无法摆脱 docker-compose

即使按照教程操作,仍然无法摆脱 docker-compose
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

我正在尝试删除并卸载与docker相关的所有内容,以便可以进行干净的重新安装。我已遵循以下教程:
如何彻底卸载docker
https://docs.docker.com/compose/install/uninstall/

我按顺序运行了以下命令:

sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli docker-compose-plugin
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce docker-compose-plugin

我以为我已经摆脱它了,但是后来:

dpkg -l | grep -i docker
ii  docker-compose                             1.29.2-1                                all          define and run multi-container Docker applications with YAML
ii  python3-docker                             5.0.3-1                                 all          Python 3 wrapper to access docker.io's control socket
ii  python3-dockerpty                          0.4.1-2                                 all          Pseudo-tty handler for docker Python client (Python 3.x)

我仍然有docker-compose 1.29.2-1,而且无论命令是什么,这个都不会消失:

sudo apt-get purge -y docker-componse
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package docker-componse

sudo apt-get remove docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'docker-compose-plugin' is not installed, so not removed

rm $DOCKER_CONFIG/cli-plugins/docker-compose
rm: cannot remove '/cli-plugins/docker-compose': No such file or directory

rm /usr/local/lib/docker/cli-plugins/docker-compose
rm: cannot remove '/usr/local/lib/docker/cli-plugins/docker-compose': No such file or directory

sudo snap remove docker
snap "docker" is not installed

rm /usr/local/bin/docker-compose
rm: cannot remove '/usr/local/bin/docker-compose': No such file or directory

sudo apt-get purge docker-ce-cli
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'docker-ce-cli' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.

rm -r /home/george/.docker

sudo rm $(which docker-compose)

dpkg -l | grep -i docker
ii  docker-compose                             1.29.2-1                                all          define and run multi-container Docker applications with YAML
ii  python3-docker                             5.0.3-1                                 all          Python 3 wrapper to access docker.io's control socket
ii  python3-dockerpty                          0.4.1-2                                 all          Pseudo-tty handler for docker Python client (Python 3.x)

which docker-compose不返回任何内容。

docker-compose 1.29.2-1仍然存在。

那是什么?我怎样才能摆脱它?

答案1

这是 Docker Compose 的旧版本,不在当前的存储库中。

尝试直接使用以下命令卸载dpkg

dpkg -P docker-compose

这不会检查任何存储库或依赖项,只是清除包,不问任何问题。

相关内容