docker build --force-rm -t code example
Example 1: remove docker image
docker image rm [image id]
Example 2: remove downloaded docker images
docker image rm [OPTIONS] IMAGE [IMAGE...]
docker image rm [image id]
docker image rm [OPTIONS] IMAGE [IMAGE...]