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:
Using Bazel to create Minecraft modpacks
I decided to modernize my system for producing builds of my personal Minecraft modpack using the Bazel buildsystem.
Mounting Google Drive accounts as network drives
I can never get the Google Drive webapp to load quickly when I need it to. My solution: use some command-line magic to mount my drives directly to my laptop's filesystem.
Reading metadata from a bitmap file
Inspired from one of my friend's projects, I built a small tool for displaying bitmap file info from the command line.

Made with ♥ by Evan Pratten | RSS | API Status