Learn Pentesting like a Pro!

Share this post

Docker trick: How to stop and remove all current containers

pentesting.academy

Docker trick: How to stop and remove all current containers

pentesting.academy
Nov 19, 2019
Share this post

Docker trick: How to stop and remove all current containers

pentesting.academy
$ docker stop $(docker ps -a -q)
$ docker rm -f $(docker ps -a -q) 

For some system maintenance:

$ docker system df
$ docker container prune # Removes all stopped containers
$ docker image prune
$ docker volume prune

Or to delete everything that is not being used:

$ docker system prune

Share this post

Docker trick: How to stop and remove all current containers

pentesting.academy
Comments
TopNew

No posts

Ready for more?

© 2023 pentesting.academy
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing