This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all forks that haven't been updated since 2020 | |
gh auth refresh -h github.com -s delete_repo | |
gh search repos \ | |
--owner ryancheley \ | |
--updated="<2020-01-01" \ | |
--include-forks=only \ | |
--limit 100 \ | |
--json url \ | |
--jq ".[] .url" \ | xargs -I {} gh repo delete {} --confirm |