From b8c5d1858496da979712ef2a828bba221de3e5c1 Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Wed, 10 Oct 2018 14:46:30 +0800 Subject: [PATCH] Enhance the clean script (cherry picked from commit 4907fc9a4df4cca3157399a6b724016926a2073c) --- scripts/clean | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/clean b/scripts/clean index 60d35d055..0be8022b3 100755 --- a/scripts/clean +++ b/scripts/clean @@ -6,5 +6,6 @@ rm -rf build dist bin images/*/build state rm -rf ./scripts/images/openstack/dist rm -rf ./scripts/images/vmware/dist -docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | grep rancher) || true -docker rmi $(docker images --filter dangling=true -q) ||true +docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | grep -E "rancher|openstack|kexec|os") || true +docker rmi $(docker images --filter dangling=true -q) || true +git clean -dxf