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