Remove an image tag from Docker Hub?
Asked Answered
S

11

53

I was unable to find resources to understand how Docker Hub images can be managed.

I have an image tagged with V0.0.1 and built a new one tagged V0.0.2. Now I want to remove the V0.0.1 image as the new version is built differently and I don't want users to pull the old image.

Sartain answered 6/6, 2015 at 8:33 Comment(2)
docker push user/myimage should update itArt
Are you talking about the Automated Build repositories? In that case, you cannot delete the tags on your own (that x mark doesn't show up).Controvert
J
65

You can easily remove or delete a tag with an image from Docker hub.

  1. Log in to Docker Hub.
  2. Go to "Repositories" on the top navigation bar, then open a specific image.
  3. Click the "Manage Repository" button.
  4. Go to the "Tags" tab on the top of the page.
  5. Mark the tag which you are going to remove with a checkbox.
  6. You will see an "Action" drop-down box on the top left. Click it and select "Delete".

tag deletion screenshot

That's it.

Jarrod answered 7/2, 2020 at 11:11 Comment(3)
I am getting a 403 Forbidden response in the Network tab of my browser when I try this...Radionuclide
You need to click the "Manage Repository" button before you can see the checkboxes and Delete action. If you can't see the checkboxes, you are in Public View.Foolery
Is there way to do this programmatically?Escritoire
G
9

Its possible, click in details on repository after click in Settings. Look the image:

print screen

Gastroenterology answered 25/8, 2016 at 11:47 Comment(4)
This deletes the repository, not the image.Planetesimal
this works! it looks like image name is considered as a repository. A repository is not all of your hub.docker.com images repository. Each of user/image_name is considered as a public repository. If you want to delete only a version of the image, then that can be done from "tags"Incommunicative
This will not remove the image, it will remove your repository.Jarrod
Some people may understand what is called "repository" as "container". This creates some confusion in the less experienced. I think the answer is very valid. =D See here hub.docker.com/support/doc/how-do-i-delete-a-repository .Misconceive
P
7

I've finally found how to do it in 2020!

You can't remove a tag from the "Tags" page right now but there is still a way:

  1. Go to the image page on Dockerhub
  2. Click on "Manage repository"
  3. Click on "See all" under "Tags and Scans"
  4. Now you can check the tags and use the action "Delete"
Pulsation answered 17/12, 2020 at 11:58 Comment(2)
Old post, but this is what worked for me as of 2020.Kanara
Success. The "see all" is the important step. Just to clarify the first step: You go to the normal home page of the image, the one with the Tabs: General, Tags, Build and on the General tab there is the "Tags and Scans" list.Pounds
E
4

In a previous version of the Hub, you could do this via the "Tags" tab, which showed a little 'x' that you could click to delete the tag. In the new version of the Hub, this seems to have gone. I can only assume the functionality will return at some stage.

The relevant issue seems to be https://github.com/docker/hub-feedback/issues/68.

At the moment, the only workarounds I can see are:

  • Delete the repository and recreate it, pushing just the tags you want to keep
  • Contact Docker support and ask them to manually remove the unwanted tags
Elysia answered 6/6, 2015 at 11:47 Comment(4)
Thanks for the input! I wonder how Docker hub is managing all the "Ghost" images that are deprecated though..Sartain
What's a "ghost" image? You can delete an image or not. Old images just lie around, hence banyanops.com/blog/analyzing-docker-hubElysia
there is no x but ive been logged in and it is my repo.Zajac
@FunThomas424242 Yeah, it seems to have gone in the new version of the Hub. Weird. It did use to be possible.Elysia
Z
4

Currently you can't delete a image from hub via command line or web portal. There are open issues:

Maybe here is a workaround: Deleting images from a private docker registry

Zajac answered 2/10, 2015 at 19:33 Comment(1)
Actually, I think the correct issue is github.com/docker/hub-feedback/issues/68 (250 is about automated builds, which you've never been able to delete tags from)Elysia
R
4

As of October 2016, delete button/icon is available when you click on your Docker Hub repository and Tags tab, on the right hand side of each version.

Docker Hub screenshot

Rights answered 7/10, 2016 at 13:3 Comment(4)
This deletes the tags, not the image.Planetesimal
Actually, this does delete the image. When images are pushed to Docker Hub, they need to be assigned to a repository with a tag. The repository name has two parts: the User/Organization that owns the repository, and the individual name of the repository. Deleting the tag does delete the image that it points to (assuming you don't have multiple tags pointing to the same image). If you want to delete bold tags associated with a repository, you can do what Humberto Barbosa said in his answer.Bravado
The original poster wanted to push a new tag and remove the old, which is exactly what this allows you to do. You can also push images over old images with the same tag. This is useful if you want to have a v1 that always tracks the most recent v1 build. Just pull the v1.0.1, tag it as v1, and push it again.Bravado
It does not delete the image. When I do docker pull locally I get the image, yet it's not there on the Tags page in Docker Hub.Severance
A
2
  1. Open hub.docker.com and sign in.
  2. Click on Details for your image.
  3. Click on Tags.
  4. Click on the delete icon (bin) on the right.

Unfortunately, even if you delete the only tag for that image, the image will still be listed in your account/repository. However, anyone who tries docker pull on that image will get an error message. I guess the only way to delete the image entirely is to delete the account (and all its images).

Aryn answered 30/1, 2017 at 16:49 Comment(0)
F
1

Since Docker Hub recently updated its user interface, you can now find the delete option under the settings tab of your repository.

So following is the workflow:

  1. Go to Repositories
  2. Select your repository to delete
  3. Select Settings tab
  4. Click Delete Repository button
  5. In the pop-up enter the repository name to confirm and confirm delete.

enter image description here

However, if you want to delete an image, go to the Tags tab. Click on the "..." symbol, it will give you the option for removing the image as shown in the following image

enter image description here

Friarbird answered 7/3, 2019 at 17:33 Comment(0)
A
1

People have been saying that the feature to delete specific tags from the Docker Hub UI has been removed, but this is inaccurate, it's just a bit more hidden.

  1. go to your repository in Docker Hub
  2. go to "Tags"
  3. at the bottom, click the "see all" link
  4. press the "..." menu to the right of the tag you want to delete
  5. press "delete"

This will allow you to delete a specific tag on the new version of Docker Hub.

Aflcio answered 16/8, 2019 at 17:37 Comment(1)
I think this doesn't exist anymorePulsation
T
0

Use https://github.com/docker/hub-tool

hub-tool tag rm --verbose --force docker.io/username/imagename:tag

For the login and more details see: https://mcmap.net/q/340717/-how-do-i-delete-a-docker-image-from-docker-hub-via-command-line

Turnstone answered 4/1 at 23:30 Comment(0)
A
-5

there is a big red "DELETE" button in "Settings" Tab when you login into your Docker Hub.

Anticipant answered 7/6, 2018 at 5:27 Comment(1)
Downvoted because the DELETE in the Settings tab is to delete the entire repository and not an individual, unwanted tag like the OP asked. Other answers have pointed to how to delete a specific tag and therefore the image (as long as there are no more tags referencing the image.)Mail

© 2022 - 2024 — McMap. All rights reserved.