Introduction
You might encounter a situation where a specific Docker image tag appears to be completely deleted from the JFrog Platform UI. It is nowhere to be found in the repository's main subfolder. However, when querying the List Docker Tags API (GET /api/docker/{repo-key}/v2/{image name}/tags/list), the "deleted" tag still shows up in the results.
This discrepancy occurs because the tag was not deleted correctly or completely. While the UI fails to render the folder, the tag's manifest.json file remains orphaned in the underlying database, meaning Artifactory's Docker registry still considers the tag to exist.
This article will walk you through a simple workaround to force the UI to recognize the hidden tag so you can delete it cleanly and completely from the database.
Resolution
To resolve this issue, we need to deploy a dummy file into its exact path. Once the folder is visible again, a standard UI deletion will properly clear the database records.
Step-by-Step Instructions
- Create a Dummy File: On your local machine, create a simple, empty text file and name it dummy.txt.
- Deploy the Dummy File: Deploy this file directly into the path of the "ghost" tag in Artifactory. You can do this via the UI's Deploy button or by using a curl command.
- The target path must be exactly: <subfolder>/<image-name>/<tag-name>/dummy.txt
- Example: my-app/ubuntu/v1.0.0/dummy.txt
- Verify the UI: Refresh your JFrog Platform UI and navigate to the image path in the Tree Browser.
- You should now see the <tag-name> folder reappear. Inside it, you will see your dummy.txt file alongside the hidden sha256 layers and manifest.json that were stuck in the database.
- Delete the Tag: Right-click on the newly visible <tag-name> folder in the UI and select Delete. This action will correctly wipe the folder, the dummy file, and the lingering database entries.
- Confirm Removal: Run the tags/list API call once more:
- The tag should now be completely gone from the returned list.
Conclusion
By deploying a dummy file to the exact path of the orphaned Docker tag, we force Artifactory to re-index that directory in the UI. This allows the system to perform a complete, clean deletion of the underlying manifest.json and database references, resolving the discrepancy between the UI and the Docker API.