You can do this by executing the following command.
docker rmi -f $(docker images -aq)
First, you can delete image withdocker rmi <image ID>.
An example is shown below.
docker rmi e035f93e2af9
However, there is a image that does not disappear occasionally with this, so add the -f option and forcibly delete it.
docker rmi -f e035f93e2af9
The following is a command to display all image IDs.
docker images -aq
You can also display the hidden image ID with the -a option.
Only the ID of image can be displayed with the -q option.
Combining these, you can remove all images with the following command, as shown at the beginning.
docker rmi -f $(docker images -aq)
Recommended Posts