Learn Pentesting like a Pro!

Share this post

Docker trick: How to stop and remove all current containers

pentesting.academy

Discover more from Learn Pentesting like a Pro!

Stay updated on the latest cybersecurity insights from Cloud and Mobile to Blockchain. (HUNDREDS OF SUBSCRIBERS)
Continue reading
Sign in

Docker trick: How to stop and remove all current containers

DH
Nov 19, 2019
Share this post

Docker trick: How to stop and remove all current containers

pentesting.academy
Share
$ 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
Share
Previous
Next
Comments
Top
New

No posts

Ready for more?

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