RepoRemover is a Python script that helps you delete multiple repositories from your GitHub account quickly and safely. It uses the GitHub CLI (gh) for authentication and API access, supporting both interactive and preconfigured modes.
- Interactive Mode: Browse and select repositories or GitHub Lists to delete.
- Preconfigured Mode: Delete repositories listed in the script.
- Safety Checks: Requires confirmation before deletion. Validates repository ownership and existence.
- GitHub Lists Support: Select repositories from your GitHub Lists for bulk deletion.
- GitHub CLI: Install via Homebrew:
brew install gh - Authentication: Run
gh auth loginand ensure you have thedelete_reposcope. If missing, the script will prompt you to refresh your authentication. - Python 3.7+
- Clone or download this repo.
- Install prerequisites (see above).
- Run the script:
- Interactive mode (default):
python delete_repos.py # or python delete_repos.py --mode interactive - Preconfigured mode:
- Edit the
REPOS_TO_DELETElist indelete_repos.py. - Run:
python delete_repos.py --mode preconfigured
- Edit the
- List-only mode (no deletion):
python delete_repos.py --list-only
- Show GitHub Lists:
python delete_repos.py --show-lists
- Delete from a specific GitHub List:
python delete_repos.py --from-list "List Name"
- Interactive mode (default):
- Deletion is PERMANENT and cannot be undone!
- The script only deletes repositories you own or have admin rights to.
- Always double-check your selections before confirming deletion.
- If you see errors about missing
ghor authentication, follow the prompts to install or log in. - If you lack the
delete_reposcope, the script will help you refresh your authentication.
A comprehensive and SAFE test suite is included to ensure reliability and security.
./run_tests.shRuns completely isolated tests with NO external interactions - safe for any environment.
python3 test_safe.py # 🔒 SAFE: No external interactionsThe safe test suite includes:
- Complete Coverage: All functionality tested with mocks
- Zero Risk: No external calls, API interactions, or real repository access
- Fast Execution: Runs in under 1 second
- CI/CD Ready: Perfect for automated testing
For detailed testing information, see TESTING.md.
Pull requests and suggestions are welcome! Please:
- Run the safe test suite:
./run_tests.sh - Add tests for new functionality
- Never commit tests that interact with real GitHub CLI
- Open an issue for bugs or feature requests
MIT License
For questions or help, open an issue or contact the maintainer.