The biggest pain of manual experimentation with Docker builds is an overwhelming number of containers / images you can generate in a very short period of time. Nothing can replace a well designed and automated Docker build system. However, before you get there, I attach the commands, which I believe will save you a lot of time.
Please bare in mind, these commands should be only used on development systems, as they will irreversibly remove all your data.
Delete all containers:
docker rm $(docker ps -a -q)
Delete all images:
docker rmi $(docker images -q)
Force delete all images (even with linked containers):
docker rmi $(docker images -q) --force
Useful post? If so, make my day by clicking the heart below!
Kamil Tamiola is the founder and the architect of Peptone — The Protein Intelligence Company. You can connect with him on AngelList, LinkedIn, Twitter, and Researchgate.