- Ensure Python3.x and the requests library is installed.
- Create a personal access token and give it the
gists
permission. - Store the access token in the
GITHUB_TOKEN
environment value - Run the script
python3 delete-gists.py
Alternatively you can combine step 2 and 3 in a single line:
GITHUB_TOKEN=<your-access-token-here> python3 delete-gists.py
This will delete all of your gists one by one, fetching 200 at a time. If you have more than 200 gists then you will need to run the script more than once to delete all of them.