docker remove dangling container code example Example 1: docker remove dangling images docker image prune Example 2: delete container id docker rm $(docker ps -a -q)