brew bundle dump
输出一堆我安装然后卸载的应用程序的点击。
我可以尝试解除每个水龙头的锁定,而 brew 将拒绝解除正在使用的任何物品的锁定。像这样,无需echo
:
brew bundle dump --file=- --no-upgrade | grep '^tap' | awk '{print $2}' | xargs -L 1 echo brew untap
brew untap 1password/tap
brew untap blakek/blakek
brew untap buo/cask-upgrade
brew untap domt4/autoupdate
brew untap hashicorp/tap
brew untap homebrew/bundle
brew untap homebrew/cask
brew untap homebrew/cask-fonts
brew untap homebrew/core
brew untap homebrew/services
brew untap isen-ng/dotnet-sdk-versions
brew untap jakehilborn/jakehilborn
brew untap withgraphite/tap
这正确地解除了大多数事物的束缚,但它也解除了以下事物的束缚homebrew
:
$ brew untap "domt4/autoupdate"
Untapping domt4/autoupdate...
Untapped 1 command (280 files, 727.4KB).
$ brew untap "hashicorp/tap"
Error: Refusing to untap hashicorp/tap because it contains the following installed formulae or casks:
vault
$ brew untap "homebrew/bundle"
Untapping homebrew/bundle...
Untapped 1 command (807 files, 2.3MB).
除此之外,最好的解决方案是执行上述操作吗grep -v homebrew
?
答案1
自从版本 4.0.0,Homebrew 现在将使用 JSON API 而不是速度慢得多的 git tap 来获取其自己的所有存储库。因此,您现在可以删除所有 Homebrew Tap。
答案2
brew update
可以取消过时的命令/公式
...
==> homebrew/core is old and unneeded, untapping to save space...
Untapping homebrew/core...
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################################################################################################################################################################################################### 100.0%
Untapped 3 commands and 6533 formulae (7,531 files, 799.2MB).
...