lmika
lmika

A useful command I occasionally use. This will list all Docker containers, and delete each one regardless of whether it’s running or not. Good if you use Docker for dev containers and need to reset your state.

docker ps -a --format '{{.ID}}' | xargs -I{} docker rm -v {}
|
Embed
Progress spinner
In reply to
sonicrocketman
sonicrocketman

@lmika Without testing it, I believe you can replace the first part with docker ps -aq.

Regardless, very useful.

|
Embed
Progress spinner
lmika
lmika

@sonicrocketman Ooh, thanks for the tip. I’ll give it a try.

|
Embed
Progress spinner