Skip to content

Instantly share code, notes, and snippets.

@GhalyahFA
Created June 18, 2019 07:21
Show Gist options
  • Save GhalyahFA/7aba04bdf07f0a53085cb90587d488cd to your computer and use it in GitHub Desktop.
Save GhalyahFA/7aba04bdf07f0a53085cb90587d488cd to your computer and use it in GitHub Desktop.
python script to mass delete repos using github api
import requests
repo_names= []
headers={"Authorization":"token YOURTOKEN"}
[repo_names.append("REPO_PREFIX"+ str(i)) for i in range(X,Y)]
for r in repo_names:
url= "https://api.github.com/repos/GhalyahF/"+r
r=requests.delete(url,headers=headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment