How to mass delete your GitHub Repositories

If you’re anything like me, you’ve probably accumulated a pile of half-baked, no-longer-needed GitHub repositories. Maybe you’re tidying up your profile. Maybe you’re trying to forget that one project from 2021. Or maybe—just maybe—you’re out of digital storage zen.

Sure, you could delete each repo one by one. But that’s a soul-crushing amount of clicking.

After going through this cleanup process more times than I’d like to admit, I found a better way. A faster, cleaner, lazier way.

Prerequisites

  • A GitHub account
  • A GitHub personal access token
  • Node.js installed
  • A healthy dose of “I refuse to do this manually”

The process

  1. Install the octopurge CLI tool:
npm install -g octopurge
  1. Authenticate using:
octopurge login
  1. Paste your personal access token when prompted, don’t worry - it’s only stored locally (or so you think)

That’s it. You’re now ready to obliterate your repos in bulk.

Deleting your repositories

  1. Run octopurge purge (how ironic)
  2. Select the repositories you want to delete
  3. Confirm the deletion
  4. Watch them vanish.

Conclusion

This method saves time, sanity, and your mouse. Whether you’re rebranding, decluttering, or rage-deleting past sins, octopurge makes it painless.

Got questions? Hit me up on Twitter.

Curious how it works under the hood? Peek at the code on GitHub.

Happy purging! 💀

Alex Kuchar