Reputation: 539
I want to remove multiple containers at a time using windows cmd I have used docker rm | docker ps -a -q but not working. Anyone, please help me on this.
docker rm $ (docker ps -a -q) this is not working on windows.
Upvotes: 1
Views: 4780
Reputation: 539
Use Windows powershell to run this command docker rm $ (docker ps -a -q)
Upvotes: 3
Reputation: 5362
it's removing only stopped containers. You first stop the containers and then remove them using your command or forcefully remove them, also, check this out, this thread, as well docker system prune
$ docker stop $(docker ps -a -q)
$ docker rm $ (docker ps -a -q)
Hope this works on Windows cmd as well.
Upvotes: 4