}

Docker: how to delete all containers or images

How to remove all containers

docker rm $(docker ps -aq) if(typeof __ez_fad_position != 'undefined'){__ez_fad_position('div-gpt-ad-tutorials_technology-medrectangle-3-0')}; How to remove all images ========================

docker rmi $(docker images -q)

Leonardo Lazzaro

Software engineer and technical writer. 10+ years experience in DevOps, Python, and Linux systems.

More articles by Leonardo Lazzaro