diff --git a/bootstrap/sbin/rebuild_system_from_scratch.sh b/bootstrap/sbin/rebuild_system_from_scratch.sh index a81047645fccd0a4bf324ed61fcf4909fb21466b..f27635f00323216de692d2ebc10cd6f75b80e172 100755 --- a/bootstrap/sbin/rebuild_system_from_scratch.sh +++ b/bootstrap/sbin/rebuild_system_from_scratch.sh @@ -32,7 +32,16 @@ function move_tango_dir_out_of_the_way() function remove_images() { - ${HOME_DIR}/bootstrap/sbin/delete_all_docker_images.sh YES_DELETE_ALL + images="$(for i in $(docker images | egrep -v "REPOSITORY" | awk '{printf "%s:%s\n", $1, $2}'); do printf "%s " ${i}; done)" + if [ ${#images} -eq 0 ]; then + echo -e "\tThere are no images to delete." + else + echo -e "\tWill now delete the following Docker images:" + for image in ${images}; do + printf "\t\t%s\n" ${image} + done + docker rmi "${images}" + fi } function pull_tango()