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
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.
Execute:
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
And delete
/var/lib/docker
, which contains your images, containers and volumes/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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With