Delete Old GitHub Forks
Created on .
Read in 1 minute.
Was browsing through my GitHub repositories and realized I have an embarrassing number of forks. A lot of these contain code that is either out of date or not even valid anymore. I used the following to quickly cleanup these repositories that I created before 2021-01-01
.
gh search repos \
--owner jpoehnelt \
--created="<2021-01-01" \
--include-forks=only \
--json url \
--jq ".[] .url" \
| xargs -I {} \
gh repo delete {} \
--confirm
You may need to refresh your auth with the delete_repo
scope.
gh auth refresh -h github.com -s delete_repo
Next
Track all Firestore write activity in Firestore
Previous
2022 Mogollon Monster 100 Mile Race Report
Related
- Unwatch All Repositories in a GitHub Organization
- GitHub Workflow to Sync Branches
- Caching Playwright Binaries in GitHub Actions
- Environment Variables in GitHub Docker build-push-action
- Rebasing All Dependabot Pull Requests
- Automatically Approving and Merging Dependabot Pull Requests
- Using Google Container Registry, Docker Buildx, and GitHub Actions