小菜鸟
分类: LINUX
2016-06-14 10:14:43
CentOS卸载清理Docker
1 杀死所有正在运行的容器
docker kill $(docker ps -a -q)
2 删除所有已经停止的容器
docker rm $(docker ps -a -q)
3 批量删除名字存在字符串“test”的镜像
docker rmi $(docker images | awk '/^test/ { print $3 }')
4 删除所有镜像
docker rmi $(docker images -q)
5 卸载Docker
yum list installed | grep docker
docker-engine.x86_64 1.10.3-1.el7.centos installed
docker-engine-selinux.noarch 1.10.3-1.el7.centos installed
yum -y remove docker-engine.x86_64
yum -y remove docker-engine-selinux.noarch
rm -rf /var/lib/docker