Search code examples
dockercentos

Docker not completely removed


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


Solution

  • A) To uninstall Docker Engine:

    sudo yum remove docker-ce docker-ce-cli containerd.io docker-compose-plugin
    

    B) To uninstall old versions of docker (previously called docker or docker-engine):

    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 and/or /var/lib/containerd, which contains your images, containers and volumes
    • and /etc/docker, which contains docker configuration files.

    Source: Official docs (uninstall Docker Engine) | Official docs (uninstall old versions).