Skip to content

Instantly share code, notes, and snippets.

@timvw
Created February 5, 2020 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timvw/f68c1b1097f632890e54be0c95e47a01 to your computer and use it in GitHub Desktop.
Save timvw/f68c1b1097f632890e54be0c95e47a01 to your computer and use it in GitHub Desktop.
Cleanup github repositories
# get token from https://github.com/settings/tokens (repo and delete_repo permissions)
export TOKEN=""
curl -H "Authorization: token $TOKEN" https://api.github.com/user/repos | \
jq '.[].full_name' | \
grep demo | \
gxargs -I '{}' curl -H "Authorization: token $TOKEN" -X DELETE https://api.github.com/repos/'{}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment