Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🗑️Bulk Delete Repositories

Bulk delete multiple old repositories and forks from your GitHub with a simple bash script and a valid personal access token with delete_repo scope.

Pre-Requisites

You would need two packages installed for the script to work.

1. jq for transforming structured JSON data.

If you're on Debian or Ubuntu, you could simply use sudo apt-get install jq to proceed.

MacOS users can use Homebrew to install jq with brew install jq.

2. HTTPie for interaction with GitHub's RESTful API.

Just like jq, HTTPie is in the official Ubuntu and Debian repositories and can be installed using sudo apt-get install httpie.

MacOS users can install HTTPie using Homebrew with brew install httpie.

Usage

Generate a valid token to access GitHub API from your here. Select the delete_repo scope to allow the script to delete repositories.

Clone this repository using

git clone https://github.com/agamjolly/BulkRepoDelete.git

Change the directory to where the cloned repository is saved using

cd <path to file>

Make the delete.sh file executable by running the following command

chmod +x delete.sh

Use the following command to execute the script

./delete.sh

All repositories on your GitHub account would be gradually deleted.

Contributing and Questions

Pull requests are welcome. For any further questions, feel free to reach out to me at me@agamjolly.com. Thank you!

License

MIT license can be found in the LICENSE file.


Created by Agam Jolly

About

🗑️ Bulk delete multiple old repositories and forks from your GitHub using a simple bash script. Uses jq for transforming structured JSON data and HTTPie to communicate with GitHub's Developer API.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages