How to remove an old version docker?

Hi I want to use

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

to remove old docker, failed with no matched argument.

I also tried

yum remove docker-ce

yum remove docker-ce-cli

same thing happens

I use

yum list installed

and find no docker related item is listed.

But I could still use all docker command like docker ps, docker images,docker version…

What happened here? How can I remove the old docker before I install a new one?

By the way, the docker version is 18.03.1, built in 2018
My system is centos 7.4

Is that due to docker is not installed and managed by yum?

Regardless if you use a docker package from the distribution’s repos or docker’s repos, it would be managed by yum/rpm, unless a binary installation was done on the host or a different package manager was used (if they exist on CentOS).

I don’t use rpm based systems, so I can’t tell you how to list the installed packages, but if your command above indeed lists the installed packages, then why not grep for lines that include the string docker like this yum list installed | grep docker.

Furthermore, please share the output of docker info.

Maybe you have Podman and not Docker and you have “docker” as an alias to podman. At least I have seen it to happen more often on Red Had based operating systems. The alias could be in a bashrc or profile file depending on what shell you are using.

Hi I think I solved the problem by finding where it is installed and manually remove them.
Thank you for the kind reply!

I resolved this problem by manually remove it, and I installed the new version docker, everything looks fine now, thanks!