Delete all unused repositories and forgotten forks in 6 (semi)-automatic steps!

Github forces me to type name of repo for every fork and repository I want to delete.
That’s smart and all, but what if one wants to mass-delete a bunch of old, unused, forgotten, dirty little repositories that make his repository list look like a mess? well, that person follows this short guide:

[1.] Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click)

[2.] Use one tab to shorten them to a list.

[3.] Save that list to to a file somewhere.
The list should be in the form of “ur_username/repo_name” per line, not a full URL!

[4.] Register a new personal access token with a delete_repo permission at this address

[5.] Use the line appropriate for your operating system below, replacing UR_TOKEN with your access_token.

[6.] For OSX + Linux:

while read repo; do curl -X DELETE -H "Authorization: token UR_TOKEN" "$repo"; done < repos.txt

[7.] For Windows: Run in powershell:

get-content D:\repolist.txt | ForEach-Object { Invoke-WebRequest -Uri$_ -Method "DELETE" -Headers @{"Authorization"="token UR_TOKEN"} }