background
At present, docker technology has become a commonly used technology stack for developers. Whether it is the construction of various complex and changeable development environments that need to be dealt with during the development process, or the automated operation and maintenance required for the production and deployment process, it is inseparable from docker. This article briefly introduces the uninstallation method of docker under linux, which is used for daily query.
1. Find installed docker packages
yum list installed | grep docker
containerd.io.x86_64 1.5.11-3.1.el7 @docker-ce-stable
docker-ce.x86_64 3:20.10.14-3.el7 @docker-ce-stable
docker-ce-cli.x86_64 1:20.10.14-3.el7 @docker-ce-stable
docker-ce-rootless-extras.x86_64 20.10.14-3.el7 @docker-ce-stable
docker-scan-plugin.x86_64 0.17.0-3.el7 @docker-ce-stable
2. Uninstall the docker package
yum remove docker-ce docker-ce-cli containerd.io
3. Delete images/containers, etc.
rm -rf /var/lib/docker
4. Using the docker command again will prompt that docker does not exist
docker version
reference
that's all.