snippets/bash/Bash script to delete ALL docker containers and images
2024-10-03 01:47:38 +02:00

3 lines
358 B
Bash

#!/bin/bash │·
for i in $(docker ps -a | tail +2 | awk '{print $1}'); do docker rm $i; done │·
for i in $(docker images | tail +2 | awk '{print $3}'); do docker rmi $i; done