Fig/docker-compose clean old "run" containers

Posted by ZedTuX 0n R00t on May 28, 2015

In the case you’re using either fig or docker-compose, after a while, you will have a lot of old containers created when using the run command.

You can clean them all with the following command:

1
docker rm `docker ps --no-trunc -aq`

This command will try to remove all the containers but will fail on running once.

See also

You shoudl also have a look at the my article to clean the <none> containers.