Skip to content

Instantly share code, notes, and snippets.

@ufukty
Last active February 17, 2026 00:06
Show Gist options
  • Select an option

  • Save ufukty/2f4f4215e8d5ad3c34e8caa0febcb933 to your computer and use it in GitHub Desktop.

Select an option

Save ufukty/2f4f4215e8d5ad3c34e8caa0febcb933 to your computer and use it in GitHub Desktop.
Delete Cloudflare Pages deployments of a project
curl "https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID:?}/pages/projects/${PROJECT_NAME:?}/deployments" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN:?}" | jq -r '.result[].id' | while read -r DEPL_ID; do
curl -X DELETE "https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID:?}/pages/projects/kask-pages/deployments/$DEPL_ID?force=true" \
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN:?}"
donea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment