Home > Operation and Maintenance > Docker > How to delete newly installed docker

How to delete newly installed docker

angryTom
Release: 2020-03-13 13:17:40
Original
2917 people have browsed it

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删除所有容器
Copy after login

1. List the installed docker related software

yum list installed | grep docker
Copy after login

2. Delete docker related software

sudo yum -y remove docker-ce.x86_64
Copy after login

3. Delete image files, containers, etc.

rm -rf /var/lib/docker
Copy after login

4. Delete configuration files, etc.

rm -rf /etc/docker
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template