how to delete image from docker code example Example 1: remove docker image docker image rm [image id] Example 2: remove docker images docker system prune -a