536

So, what is the difference between brew and brew cask?

I know that homebrew is a package management software. But what kind of software can I get there? Is it open source software and commercial software?

nohillside
  • 100,768
elzaphod
  • 5,599
  • 1
    Related: https://stackoverflow.com/questions/46403937/what-is-the-difference-between-brew-install-xxx-and-brew-cask-install-xxx – Ciro Santilli OurBigBook.com Mar 20 '20 at 16:17
  • 7
    As of Homebrew 2.6.0 brew cask has been deprecated in favor of brew: https://brew.sh/2020/12/01/homebrew-2.6.0/ – Christian Perry May 13 '21 at 19:14
  • I think the above comment about brew cask deprecation is slightly misleading as most brew cask commands now use brew with --cask (also hinted at in the linked blog post). See @Epic Programmer's answer for further detail: https://apple.stackexchange.com/a/449692/175188 – Louie Louie Dec 26 '23 at 18:13

3 Answers3

459

Homebrew

brew is the core command for the Homebrew project.

The missing package manager for OS X

Homebrew installs the stuff you need that Apple didn’t.

Homebrew typically deals with command line software. Most of the software is distributed under an open source licence. See the Formulas for a list of available installs.

brew prefers pre-compiled binaries but will compile from source in some cases.

Cask

brew cask is an extension to brew that allows management of graphical applications through the Cask project.

Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike.

Cask deals with a mixture of software and licences. The software I work on is covered by a commercial licence and available via cask.

Cask offers a way to command line manage the installation of graphical applications.

See brew cask issue #7002 about the project's focus on predictability and how that affects the use of pre-compiled binaries or source.

Licensing

Availability through brew or cask does not imply any specific licence.

Graham Miln
  • 43,776
28

brew cask install foo appears to be a shortcut for brew install caskroom/cask/foo:

ct@MBA45:~$ brew tap
caskroom/cask
homebrew/core
homebrew/php
ct@MBA45:~$ brew install meld
Error: No available formula with the name "meld" 
It was migrated from homebrew/core to caskroom/cask.
You can access it again by running:
  brew tap caskroom/cask
ct@MBA45:~$ brew tap caskroom/cask
ct@MBA45:~$ brew install meld
Error: No available formula with the name "meld" 
It was migrated from homebrew/core to caskroom/cask.
You can access it again by running:
  brew tap caskroom/cask
ct@MBA45:~$ brew install caskroom/cask/meld
==> brew cask install caskroom/cask/meld 
==> Satisfying dependencies
==> Downloading https://github.com/yousseb/meld/releases/download/osx-9/meldmerge.dmg
######################################################################## 100,0%
==> Verifying checksum for Cask meld
==> Installing Cask meld
==> Moving App 'Meld.app' to '/Applications/Meld.app'.
==> Linking Binary 'Meld' to '/usr/local/bin/meld'.
  meld was successfully installed!
ct@MBA45:~$ brew cask install meld
Warning: Cask 'meld' is already installed.

To re-install meld, run:
  brew cask reinstall meld

Cask is the part of brew for GUI apps.

22

In 2021, brew cask was removed. Most of all the old brew cask commands have a --cask modifier for the commands. For example, brew cask install is now brew install --cask, brew cask uninstall is brew uninstall --cask, and so on.