snippets/bash/Bash script to delete ALL docker containers and images

3 lines
358 B
Plaintext
Raw Normal View History

2024-10-02 23:47:38 +00:00
#!/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