Skip to content

Instantly share code, notes, and snippets.

@emadshanab
Forked from random-robbie/docker.sh
Created March 25, 2022 01:47
Show Gist options
  • Save emadshanab/f00c13365beb203fc1532e269824e44b to your computer and use it in GitHub Desktop.
Save emadshanab/f00c13365beb203fc1532e269824e44b to your computer and use it in GitHub Desktop.
docker kill and remove
#!/bin/bash
# kill current docker
docker kill $(docker ps -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment