Retiring a broken release
When a published version is confirmed broken, take it out of circulation so nobody picks it up by accident. There are three parts: remove the image, mark the release, delete the tag.
1. Remove the broken image
Section titled “1. Remove the broken image”Create a token
Section titled “Create a token”You need a Personal Access Token with the Packages → Delete scope.
Find the version ID
Section titled “Find the version ID”curl -s -H "Authorization: Bearer YOUR_PAT" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/orgs/ELIXIR-NO/packages/container/fega-norway/versions \ | jq '.[] | select(.metadata.container.tags[]? == "COMPONENT_NAME-VERSION")'Replace YOUR_PAT with your token and COMPONENT_NAME-VERSION with the image tag. Copy the
version id from the output.
Delete it
Section titled “Delete it”curl -X DELETE -H "Authorization: Bearer YOUR_PAT" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/orgs/ELIXIR-NO/packages/container/fega-norway/versions/VERSION_ID2. Mark the release as broken
Section titled “2. Mark the release as broken”Find the version on the Releases page and append this to the release title:
-verified-brokenThe deleted image no longer pulls, but the release entry remains visible. Marking it means anyone scanning the release list sees immediately why that version is missing, instead of assuming an accident.
3. Delete the tag
Section titled “3. Delete the tag”GitHub exposes tags as Git references under refs/tags. This needs a separate token with
the repo scope, since the packages token above cannot touch refs.
curl -X DELETE \ -H "Authorization: Bearer YOUR_PAT" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos/ELIXIR-NO/fega-norway/git/refs/tags/TAG_NAMEChecklist
Section titled “Checklist”- Image version deleted from the container registry
- Release title suffixed with
-verified-broken - Git tag deleted via the API
- Team told which version to avoid and what to use instead
Built from f91944d