.
This article discusses several ways to delete Docker images from Nexus Repository 3.
To finalize the cleanup of Docker assets, please note that specific scheduled tasks are required.
Options to Delete Docker Images
Option 1: Use the official docker API directly
You can use the docker API directly:
https://docs.docker.com/registry/spec/api/#deleting-an-image
The trick in using this method successfully is using the correct manifest hash.
Option 2: Delete Docker components (manifests) using the Nexus Repository REST API plus a scheduled task
Delete the docker component via the Component API:
DELETE <nexusURL>/service/rest/v1/components/{COMPONENT_ID}
You can obtain the component ID
by searching for the docker image via its coordinates (name, version, repo) using the Search API.
Option 3: Delete using UI Browse
Sign in to the Nexus Repository UI and Browse to the Docker manifests you wish to delete. Use the Delete button exposed after a manifest is selected.
Option 4: Clean up Docker Images by Cleanup Policy
Review the documentation on clean-up using the Repository Cleanup Policies.