Skip to content

How to delete deployments? #85000

Answered by nickkipshidze
Daridjcm asked this question in Actions
Discussion options

You must be logged in to vote

It appears you can use GitHub CLI for that too:

gh api \
  --method DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /repos/OWNER/REPO/deployments/DEPLOYMENT_ID

Or curl:

curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/OWNER/REPO/deployments/DEPLOYMENT_ID

This may help: https://docs.github.com/en/rest/deployments/deployments

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Daridjcm
Comment options

Answer selected by Daridjcm
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@idzm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question
6 participants