Remove all Docker containers

Adam K Dean - Jun 5 '14 - - Dev Community

After working with Docker for only a few hours, I now have more old containers than I have fingers.

A quick and easy way to remove these is to run:

$ docker rm $(docker ps -q -a);
Enter fullscreen mode Exit fullscreen mode

-q is quiet mode, which only returns container IDs.

-a is all, which as it's name suggests, returns all containers.

This will try and remove any running containers too, but that will fail.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player