There are no good ways to remove everything from a specific tap.
I tried untap
; it just untaps the tap, but not dealing with the packages
installed from it, and actually reinstalling package installed from it
would result in tapping that specific tap back.
If there are no good ways to uninstall tap along with its packages Is there any way to list all installed packages and show which tap they are from?
The brew tap command You can install and uninstall them with brew [un]install , and the formulae are automatically updated when you run brew update .
brew untap user/repo [user/repo user/repo ...] removes the given taps. The repositories are deleted and brew will no longer be aware of their formulae. brew untap can handle multiple removals at once.
The proper way to remove a Homebrew package is with the uninstall or remove command. The uninstall Homebrew package command looks like this: The remove Homebrew package command looks like this: As you may have guessed by now, the remove and uninstall commands are exactly the same, and get the same result; the removal of the Homebrew package.
That is, brew tap username/foobar can be used as a shortcut for the long version: brew tap username/homebrew-foobar. brew will automatically add back the ‘homebrew-‘ prefix whenever it’s necessary. If your tap contains a formula that is also present in homebrew/core, that’s fine, but it means that you must install it explicitly by default.
When you use brew tap on the command line, however, you can leave out the ‘homebrew-‘ prefix in commands. That is, brew tap username/foobar can be used as a shortcut for the long version: brew tap username/homebrew-foobar. brew will automatically add back the ‘homebrew-‘ prefix whenever it’s necessary.
As you may have guessed by now, the remove and uninstall commands are exactly the same, and get the same result; the removal of the Homebrew package. For example, to remove and uninstall Telnet (assuming you installed telnet on the Mac with Homebrew anyway), you would use the following command string:
Is there any way to list all installed packages and show which tap they are from?
You can list all installed packages with brew ls --full-name --formula
. Tap’d formulae are prefixed with their tap:
$ brew ls --full-name --formula
...
webp
xz
yarn
z
zlib
bfontaine/utils/eq
osrf/simulation/ignition-math3
In the output below, bfontaine/utils/eq
is the formula eq
from my bfontaine/utils
tap. ignition-math3
is from the osrf/simulation
tap.
By default, brew ls
shows formulae on multiple columns. You can force them to display one one column by piping the output to cat
:
$ brew ls --full-name --formula | cat
How do I remove everything from a Homebrew tap?
Based on the above, you could do something like this:
$ brew ls --full-name --formula | grep '^your/tap/' | xargs brew uninstall
Note: if you don’t use --formula
, brew ls
also shows casks, which are special formulæ that install .app
s.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With