purpose of brew update before brew install - macos

Most places recommend running a brew update before a brew install. as such:
brew update
brew install <package_name>
What is the purpose of first running a brew update?
I've done installs without updates several times and it worked fine

You don't really need to do brew update before brew install. The brew install command automatically updates the resources (that's what brew update does) before installing anything.

Related

Homebrew have to be reinstalled everyday

I install brew on my macOS Ventura, I use it and next day im trying to run brew again and it says brew command not found and I have to reinstall it...
I just install it every time I need it...

How to uninstall twilio-cli from Mac osx using brew

I am on Mac os and could get twilio-cli. I have installed it using brew.
I tried
brew uninstall twilio
brew remove twilio
It gives below error
Warning: Twilio is switching the default branch from 'master' to 'main'
Warning: requiring an update to the default homebrew tap.
Warning:
Error: To upgrade twilio-cli, retap it with:
brew untap twilio/brew
brew tap twilio/brew
brew upgrade twilio
I applied above suggested commands but it still give same error over and over again.
Try this first
brew update-reset $(brew --repo twilio/brew)
Then try
brew uninstall twilio
brew untap twilio/brew
brew tap twilio/brew
brew install twilio
If that fails, then I would go to the folder
/usr/local/Homebrew/Library/Taps/twilio/
and manually delete the hombrew-brew folder rm -rf homebrew brew
Then I would do brew tap twilio/brew && brew install twilio
After that you might as well run brew update && brew upgrade
then brew doctor to make sure everything is good
brew install twilio/brew/twilio should be enough.

How do I install the latest developer package for wine with homebrew? (wine-3.0-rc2)

When I type in:
brew install wine
That should install Wine 2.0.3, right? (the latest release)
But I want to install a specific version of wine: wine 3.0 rc2
What would the command to do this be if I'm using homebrew? I've tried
brew install wine-devel
But it gives me this error:
Error: No available formula with the name "wine-devel"
Any help? Thanks!
Currently wine-devel has been moved to caskroom/versions. Therefore in order to install wine-devel you have to
Tap caskroom/versions, by running brew tap caskroom/versions
Update homebrew (...just to be sure) by running brew update
Finally install wine-devel by running brew install caskroom/versions/wine-devel
caskroom/versions was moved to homebrew/cask-versions.
The following will work:
brew tap homebrew/cask-versions
brew install homebrew/cask-versions/wine-devel
You will be asked for your password.
Then you should be able to start executables as follows:
wine /path/to/app.exe
I was trying to install wine-devel, but ran into a similar problem. It seems that the answers here may each have been relevant on a different year, as the casks have moved around back and forth. So here's the latest on the situation, and some info on how to handle it in future.
The official instructions (as of 4th April 2020) say to run brew cask install wine-stable. However, that leads to an error:
$ brew cask install wine-stable
Error: Cask wine-staging exists in multiple taps:
homebrew/cask-versions/wine-staging
caskroom/versions/wine-staging
This means that two potential casks were found, each with the same name, yet each on a different repository, and Homebrew was unsure which one to install.
Running this command gave me a clue about what was going on:
$ brew tap caskroom/versions
Error: caskroom/versions was moved. Tap homebrew/cask-versions instead.
So I learned that you can untap third-party repositories, and untapped the one that the message seemed to advise not to tap WINE casks from.
$ brew untap caskroom/versions
Untapping caskroom/versions...
Untapped 156 casks (463 files, 56.7MB).
$ brew cask install wine-stable
... Success!
To install the development version just pass --devel
brew install --devel wine

How to uninstall apt-get on OSX?

Is apt-get part of the OSX?
If not, what would be the easiest way to uninstall it from the system?
Try using brew install/uninstall pkg; For example:
brew uninstall apt-get
These commands might prove useful:
brew list # list all installed packages
brew search partial-name # search for available packages
brew info pkg-name # get information about a package
apt-get is a debian package manager, there is no way to use this on mac.. (well no good way or point of using it because all the packages would fail to install even if you managed to get apt-get to install)
Use MacPorts or Homebrew...

homebrew uninstall ruby

I just installed ruby via
brew install ruby
I have been advised to install it via RVM, even if I use Homebrew, but first I want to uninstall the ruby that homebrew just installed.
Can I simply do
brew uninstall ruby
Or do I need to do something else?
Yes, brew uninstall ruby should do the trick.
For more info, you can type man brew in your terminal.
Doing brew uninstall ruby will work. If you really want to be sure, you can run brew cleanup after running the first command. Homebrew just removes unnecessary packages with the brew cleanup command. In some cases, the last command is necessary for the formula to be completely gone. (An example is with the tree formula, I had to use brew cleanup for it to be entirely uninstalled.)
(I know this is late but this can apply to anyone who is viewing this)
This might help other people who used rbenv to manage their ruby versions & have installed rbenv using the command below
brew install rbenv ruby-build
You can uninstall ruby by
brew uninstall rbenv && brew uninstall ruby-build
You can refer to the Installing Ruby section of this guide.

Resources