The Easiest Way To Delete Multiple GitHub Repositories At Once

Open Source Office Hours
2 min readDec 27, 2018

--

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.

  1. Go to RepoSweeper.com
  2. Enter GitHub Username
  3. Click “Generate Access Token” button
  4. Click “Generate New Token” on GitHub (Fine Grained Access Token, not “classic”)
  5. Give the token a name
  6. Under “Repository Access”, click “All Repositories” (Or public only, if you don’t want to delete any private ones)
  7. Under “Permissions”, click “Repository Permissions”, then under “Administration” click “Read and Write)
  8. Click “Generate token”
  9. Copy token into “Authorization Token” field in RepoSweeper
  10. Click “Generate Repositories”
  11. Select repositories you want to delete
  12. Double check on the confirmation page
  13. Click “Confirm”
  14. Done!

Hope you found it easy. Thanks!

--

--

Open Source Office Hours

Product Development, Business Automation, Mentoring and Software Education.