Home >Operation and Maintenance >Docker >How to delete newly installed docker
How to delete the newly installed docker
$ docker ps // 查看所有正在运行容器 $ docker stop containerId // containerId 是容器的ID $ docker ps -a // 查看所有容器 $ docker ps -a -q // 查看所有容器ID $ docker stop $(docker ps -a -q) // stop停止所有容器 $ docker rm $(docker ps -a -q) // remove删除所有容器
1. List the installed docker related software
yum list installed | grep docker
2. Delete docker related software
sudo yum -y remove docker-ce.x86_64
3. Delete image files, containers, etc.
rm -rf /var/lib/docker
4. Delete configuration files, etc.
rm -rf /etc/docker
5. Remove old versions through scripts
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine
For more related tutorials, please pay attention to PHP Chinese website docker tutorial column.
The above is the detailed content of How to delete newly installed docker. For more information, please follow other related articles on the PHP Chinese website!