🗑️ 一键清空 GitHub 仓库

使用 GitHub CLI (gh) 删除所有 GitHub 仓库的步骤如下:

  1. 📥 安装 gh CLI:

    • macOS(使用 Homebrew): brew install gh
    • Windows(使用 Scoop): winget install --id GitHub.cli或者scoop install gh
    • 更多安装选项,请访问 GitHub CLI 官方文档。
  2. 🔑 登录 GitHub 账户: 执行以下命令并按照提示操作:

    bash 复制代码
    gh auth login
  3. 🔐 请求删除仓库所需的额外权限 : 执行以下命令来添加 delete_repo 权限:

    bash 复制代码
    gh auth refresh -h github.com -s delete_repo
  4. 🚀 一句话命令删除所有仓库 : 使用以下命令列出并删除所有仓库(请确保将 <YOUR_USERNAME> 替换为你的 GitHub 用户名):

    bash 复制代码
    gh repo list <YOUR_USERNAME> --limit 1000 --json nameWithOwner --jq '.[].nameWithOwner' | xargs -I {} gh repo delete {} --yes

🚨 重要提示:删除 GitHub 仓库是不可逆的操作,请确保你已经备份了所有需要保留的数据。特别是在执行最后一步之前,务必再次确认是否真的需要删除所有仓库。

相关推荐
miofly13 小时前
Nous Research微调Qwen3.8-27B,宣称可剥离中国官方立场内容
开源·github
用户29914221968019 小时前
GitHub 热榜项目:周榜(2026-11-08)
人工智能·开源·github
用户29914221968019 小时前
GitHub 热榜项目:日榜(2026-11-08)
人工智能·开源·github
miofly1 天前
GitHub 周榜趋势速报 | 2026-11-08
开源·github
miofly1 天前
GitHub 日榜趋势速报 | 2026-11-08
开源·github
miofly2 天前
百度开源ERNIE 5.5 Flash Base,总参数280B仅激活14B
开源·github
dong_junshuai2 天前
每天一个开源项目#154 Nushell:结构化管道怎样跨过文本边界
github
Jason_gao9992 天前
Github Copilot 新手极速上手指南
人工智能·github·copilot
GitHub实测笔记2 天前
hexyl 本机实测:8MiB 转储中位 102ms、od 696ms(约 6.8×);默认双面板,NO_COLOR 下要 --color=force
github
MoRay2 天前
放弃云端 Computer Use,我用 Python 手搓了一个带“物理防呆”的本地 GUI Agent 底座
python·github