Skip to content
Select theme

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.

You need a Personal Access Token with the Packages → Delete scope.

Terminal window
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.

Terminal window
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_ID

Find the version on the Releases page and append this to the release title:

-verified-broken

The 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.

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.

Terminal window
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_NAME
  • 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