49

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.

baitmbarek
  • 2,440
  • 4
  • 18
  • 26

10 Answers10

61

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.

Owain Williams
  • 2,387
  • 17
  • 22
chiducaf
  • 773
  • 5
  • 8
10

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

print screen

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
  • 22
    This deletes the repository, not the image. – Carey Gister Oct 23 '16 at 18:32
  • 2
    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" – vishnu viswanath Mar 06 '18 at 12:06
  • This will not remove the image, it will remove your repository. – chiducaf Jul 17 '20 at 08:19
  • 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 https://hub.docker.com/support/doc/how-do-i-delete-a-repository . – Eduardo Lucio Dec 24 '21 at 02:25
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"
Adrien Pavao
  • 452
  • 5
  • 11
  • Old post, but this is what worked for me as of 2020. – 8675309 Dec 28 '20 at 22:20
  • 2
    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. – Werner Daehn Apr 21 '21 at 17:21
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
Adrian Mouat
  • 44,585
  • 16
  • 110
  • 102
  • 3
    Thanks for the input! I wonder how Docker hub is managing all the "Ghost" images that are deprecated though.. –  Jun 06 '15 at 16:24
  • What's a "ghost" image? You can delete an image or not. Old images just lie around, hence http://www.banyanops.com/blog/analyzing-docker-hub/ – Adrian Mouat Jun 06 '15 at 16:55
  • there is no x but ive been logged in and it is my repo. – Huluvu424242 Oct 02 '15 at 19:19
  • 1
    @FunThomas424242 Yeah, it seems to have gone in the new version of the Hub. Weird. It did use to be possible. – Adrian Mouat Oct 02 '15 at 22:19
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

Community
  • 1
  • 1
Huluvu424242
  • 756
  • 10
  • 25
  • 1
    Actually, I think the correct issue is https://github.com/docker/hub-feedback/issues/68 (250 is about automated builds, which you've never been able to delete tags from) – Adrian Mouat Oct 02 '15 at 22:29
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

ozren1983
  • 1,891
  • 1
  • 16
  • 34
  • 4
    This deletes the tags, not the image. – Carey Gister Oct 23 '16 at 18:32
  • 1
    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](http://stackoverflow.com/users/4835858/humberto-barbosa) said in his answer. – Jonathon Richardson Nov 25 '16 at 18:47
  • 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. – Jonathon Richardson Nov 25 '16 at 18:56
  • 1
    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. – duality_ Feb 16 '17 at 10:50
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).

Paulo Merson
  • 13,270
  • 8
  • 79
  • 72
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

Md Hasan Ibrahim
  • 1,868
  • 19
  • 27
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.

Sam Johnson
  • 624
  • 1
  • 7
  • 20
-5

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

  • 3
    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.) – praneetloke Jul 10 '19 at 18:38