Last active
July 17, 2018 01:07
-
-
Save sethbunke/8056fb7198b056942b3bf3615652b24b to your computer and use it in GitHub Desktop.
Show all stopped Docker containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#show all stopped containers | |
docker ps --filter "status=exited" | |
docker ps -f "status=exited" | |
#remove image | |
docker rmi image-id | |
#remove container | |
docker rm container-id | |
#remove all stopped containers | |
docker rm $(docker ps --filter "status=exited" -q) | |
#stop all containers: | |
docker kill $(docker ps -q) | |
#remove all containers | |
docker rm $(docker ps -a -q) | |
#remove all docker images | |
docker rmi $(docker images -q) | |
#remove all containers forcefully | |
docker rm -f $(docker ps -a -q) | |
#remove all docker images forcefully | |
docker rmi -f $(docker images -q) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment