Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Useful Docker Commands
- kill all running containers with
- ```
- docker kill $(docker ps -q)
- ```
- delete all stopped containers with
- ```
- docker rm $(docker ps -a -q)
- ```
- delete all images with
- ```
- docker rmi $(docker images -q)
- ```
- delete all unused & unnamed images
- ```
- docker rmi -f $(docker images -f "dangling=true" -q)
- ```
- Remove all containers with status=exited
- ```
- docker rm $(docker ps -q -f status=exited)
- ```
- Stop all containers (will run stop only for active)
- ```
- docker stop $(docker ps -q)
- ```
- Stop all containers (will run stop only for all)
- ```
- docker stop $(docker ps -aq)
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement