use curl to delete an image from docker hub code example
Example: use curl to delete an image from docker hub
curl -X DELETE -u "$user:$pass" https://index.docker.io/v1/repositories/$namespace/$reponame/
curl -X DELETE -u "$user:$pass" https://index.docker.io/v1/repositories/$namespace/$reponame/