brew bundle dump outputs a bunch of taps for apps I installed, then uninstalled.
I could just try untapping every tap, and brew will refuse to untap anything in use. Like this without 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
This correctly untaps most things, except it also untaps everything from 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).
Is the best solution to do the above, except also grep -v homebrew?