Low Orbit Flux Logo 2 F

Docker How To Delete Image From Registry

We are going to show you how to delete an image from the docker registry.

It is easy to push and pull images form Docker Hub.

There isn’t a straight forward option to just remove an image from the hub using the API. One option that does exist is the API.

Here is how you could remove an image from the registry using the API:



curl -X DELETE -u "$user:$pass" https://hub.docker.com/v2/repositories/namespace/reponame/

Here is an example of what this command might look like:



curl -X DELETE -u "testaccount3@gmail.com:Password1"  https://hub.docker.com/v2/repositories/testaccount3/mytestimage

Full disclosure: I haven’t gotten this to work yet.

The instructions here may work: