Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pradyumnac/4aaf21781f013b3997252a78c846fdf1 to your computer and use it in GitHub Desktop.
Save pradyumnac/4aaf21781f013b3997252a78c846fdf1 to your computer and use it in GitHub Desktop.
How to delete multi repositories in github ( Windows)
# Deleting multi repositories from github in windows
1. Download & Install github CLI
2. Authenticate using `gh auth login` in windows command prompt ( Browser window will open)
3. Add extra permitions ( for delete) using `gh auth refresh -h github.com -s delete_repo ` from cmd
4. Ensure all your repos to be deleted are saved in a file `repos.txt` current folder in format "username":"reponame"
5. run the above batch file from same folder
REm Make sure your current folder has the file repos.txt
for /f "tokens=*" %%f in (repos.txt) do (
"C:\Program Files\GitHubCLI\gh" repo delete %%f --confirm
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment