I did some cleaning

Spring cleaning is fun when it isn't spring, and a computer does all the work

2019-08-27 random

As I am continuing to check items off my TODO list before school starts, I have come to an item I have been putting off for a while. Clean up GitHub Account. Luckily, I discovered a little trick to make the process of deleting unused repos a little easier!

Getting a list of repos to delete

I could have automated this, but I prefer a little control. To get the list, start by opening up a new Firefox window with a single tab. In this tab, open your GitHub profile to the list of repos. Starting from the top, scroll through, and middle click on anything you want to delete. This opens it in a new tab.

Once you have a bunch of tabs open with repos to remove, use this Firefox plugin to create a plaintext list of every link you opened, and paste the list of links into VS-code.

Getting an API token

Next, an API token is needed. Go to GitHub’s token settings, and generate a new one (make sure to enable repository deletion).

With our new token, and out VS-code file, we can start “parsing” the data.

Pressing CTRL + F brings up the Find/Search toolbar. In the text box, there are a few icons. Pressing the one farthest to the right will enable Regex mode. With this set, paste the following:


Now, click the arrow on the left to enable replace mode, and put this in the new box:

curl -XDELETE -H 'Authorization: token <API token from above>' "https://api.github.com/repos/

Then press replace all.

Finally, replace the contents of the first box with:


and the second with:


and replace all again.

Deleting the repos

Simply copy the entire text file that was made, and paste it in a terminal, then press <enter> (this will take a while)

Thank you for reading this post. If you enjoyed the content, and want to let me know, or want to ask any questions, please contact me via one of the methods listed here. If you would like to be notified about future posts, feel free to load my rss feed into your favorite feed reader, or follow me on Twitter for notifications about my work and future posts.

If you have the time to read some more, I recommend checking out one of the following posts:

Tunneling a printer from a home network to a VPN
I use a self-hosted VPN to access all my devices at all times, and to deal with my school's aggressive firewall. This post explains the process I use for exposing my home printer to the VPN.
2020 Wrap-Up
2020 has been my most productive year so far in terms of software development. This post looks back at the year
How I have tweaked my Minecraft client to be 'just right'
Over the past 10 years, I have been building the perfect Minecraft experience for myself. This post shares the collection of mods I run, and why I use them.

Made with ♥ by Evan Pratten | RSS | API Status