Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker not completely removed

Tags:

docker

centos

I have a problem while installing docker-ce

I trying to remove old docker by using command yum remove docker docker-common docker-selinux docker-engine. But I noticed that all docker command is still usable. For example, [root@caffeDNN ~]# docker version Client: Version: 1.13.1 API version: 1.26 Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 08:47:51 2017 OS/Arch: linux/amd64 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [root@caffeDNN ~]# So, I trying to uninstall it again by using the same command but yum could not found any docker package anymore.

Is there any solution to remove docker completely by avoiding conflict with docker-ce?

Method I tried

like image 993
r4yr1ffy Avatar asked Feb 24 '18 12:02

r4yr1ffy


People also ask

How do I remove all docker containers?

Stop and remove all containers The following command is convenient if you want to stop/remove all the containers, including the running container. In this command, docker ps -a -q is used to display a list of IDs of all Docker containers, and docker rm is used to delete them.


2 Answers

Execute:

sudo yum remove docker \
              docker-client \
              docker-client-latest \
              docker-common \
              docker-latest \
              docker-latest-logrotate \
              docker-logrotate \
              docker-engine

And delete

  • the directories /var/lib/docker, which contains your images, containers and volumes
  • and /etc/docker, which contains docker configuration files.

But if you want to reinstall it anyway just continue.

It’s OK if yum reports that none of these packages are installed.

Source: Official docs.

like image 120
Yannic Hamann Avatar answered Sep 22 '22 13:09

Yannic Hamann


for newer versions you need to remove the cli as well

sudo yum remove -y docker-ce docker-ce-cli

that will do the trick

like image 22
Marcos Cano Avatar answered Sep 21 '22 13:09

Marcos Cano