Here is what you can try.
There is a command to list all the image id's i.e.,
docker images -q
To remove all the images use the below command i.e
docker rmi $(docker images -q)
It might happen that some of the images are being used by a container.
So, you will have to stop those containers.
I hope that the above explanation will resolve your query.