From 9d375f727a82e3fd6955c32bdb2ec0f93b22b4ac Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 10 Dec 2021 14:42:47 +0100 Subject: [PATCH] Create pruneall.sh --- pruneall.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 pruneall.sh diff --git a/pruneall.sh b/pruneall.sh new file mode 100755 index 0000000..d1a8d1f --- /dev/null +++ b/pruneall.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Stop all containers +docker kill $(docker ps -q) + +# Remove all stopped containers +docker rm -f $(docker ps -aq) + +# Remove all docker images +docker rmi $(docker images -q) + +# Remove all volumes +docker volume rm $(docker volume ls -q) + +# Remove ckan-docker_default network +docker network rm ckan-docker_default