The Easiest Way To Delete Multiple GitHub Repositories At Once
If you don’t like reading, here are the links: App, Demo. Otherwise below is the reason for building RepoSweeper followed by the instructions at the bottom.
Bootcamp students and CS students all have the same question after they graduate: “Do I really have to delete repositories one by one?” A few weeks ago I graduated from Flatiron School and had nearly 400 forked labs to delete. Unfortunately, GitHub only allows a user to erase one repository at a time, and it’s not a very user-friendly process. Deleting hundreds could easily exceed an hour.
So I scavenged the internet and found a few people who created ways to erase repositories en masse through shell prompts. They worked! Definitely shoutout Scott Davidson and Colby Pines. But mostly shoutout Yangshun Tay, who created the most intuitive code, and subsequently the core logic of my app. But still, these were not intuitive from a user-standpoint, and they were restrictive because you had to make specifications on setup that would determine the types of repositories that would be deleted.
So I decided to make some changes and integrate them with an intuitive UI. Say hello to RepoSweeper. It’s super easy. It takes just two inputs, your GitHub Username and an Authorization Token.
Follow these steps and you can’t get lost.
- Go to RepoSweeper.com
- Enter GitHub Username
- Click “Generate Access Token” button
- Click “Generate New Token” on GitHub (Fine Grained Access Token, not “classic”)
- Give the token a name
- Under “Repository Access”, click “All Repositories” (Or public only, if you don’t want to delete any private ones)
- Under “Permissions”, click “Repository Permissions”, then under “Administration” click “Read and Write)
- Click “Generate token”
- Copy token into “Authorization Token” field in RepoSweeper
- Click “Generate Repositories”
- Select repositories you want to delete
- Double check on the confirmation page
- Click “Confirm”
- Done!
Hope you found it easy. Thanks!