Skip to content

Instantly share code, notes, and snippets.

@bsramin
Forked from ghorbanzade/deletePackageVersion.sh
Created April 8, 2020 22:21
Show Gist options
  • Save bsramin/0bb9639a88858679cf4d7d9881d71294 to your computer and use it in GitHub Desktop.
Save bsramin/0bb9639a88858679cf4d7d9881d71294 to your computer and use it in GitHub Desktop.
registryPackagesForQuery and deletePackageVersion
curl -X POST \
-H "Accept: application/vnd.github.package-deletes-preview+json" \
-H "Authorization: bearer <PERSONAL_ACCESS_TOKEN>" \
-d '{"query":"mutation { deletePackageVersion(input:{packageVersionId:\"<PACKAGE_VERSION>\"}) { success }}"}' \
https://api.github.com/graphql
curl -X POST \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.github.packages-preview+json" \
-d '{"query": "{user(login: \"<USERNAME>\") { registryPackagesForQuery(packageType: DOCKER, first: 100) { edges { node { name id versions(first: 100) { nodes {id} } } } } } }"}' \
https://api.github.com/graphql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment