# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")
References:
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")
References:
docker container stop $(docker container ps -q)
docker container rm $(docker container ps -aq)
docker image rm $(docker image ls -fq dangling=true)
docker system prune
will remove dangling images, stopped containers, unused networks and build cache.