How can I use Homebrew cask to install Sublime Text 3? I only see Sublime Text 2 when using Homebrew's search. I even tried tapping homebrew/versions, but no luck.

- 2,953
- 3
- 28
- 42

- 12,212
- 15
- 59
- 107
-
1Why isn't 3 the default in the normal cask. So weird – Setheron Oct 22 '15 at 21:33
-
You might want to change the accepted answer since the answer has changed. @frizkie has provided the new procedure, which funny enough is the same as the downvoted answer that was accepted. – Snekse Jul 12 '16 at 21:16
9 Answers
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install sublime-text
Weird how I will struggle with this for days, post on StackOverflow, then figure out my own answer in 20 seconds.
[edited to reflect that the package name is now just sublime-text
, not sublime-text3
]
[edit]: As of 2022-11-07, above is incorrect.
See taylorthurlow's correct answer.

- 95
- 1
- 8

- 12,212
- 15
- 59
- 107
-
Cannot find cask _sublime-text3_ on my machine, only _sublime-text_, which is 2.0.2 now. – Sergey Kostrukov Jan 07 '15 at 08:46
-
1
-
6Thanks. Also, for what it's worth, you can tap and install in one command like this: `brew cask install caskroom/versions/sublime-text3` – KylePDavis Apr 10 '15 at 13:39
-
4Ok, but you need the "cask" plugin before : `brew install caskroom/cask/brew-cask` – Paul Rad Apr 23 '15 at 12:20
-
-
Sidenote: if you try this and get the error **"Error: Cask 'sublime-text3' definition is invalid: Bad header line: parse failed"**, run `brew uninstall --force brew-cask && brew update` then retry. – SteamDev Feb 15 '16 at 20:51
-
1Sublime text is 3114 now. So the last step should be replaced with brew cask install sublime-text – realhu Aug 07 '16 at 13:50
-
4Try `brew cask install sublime-text` when getting `No available Cask for sublime-test3.` – Robin Wieruch Nov 05 '16 at 15:17
-
This should be the accepted answer. Also, as other comments state, the last line should be `brew cask install sublime-text`. – Borealis Jan 18 '17 at 04:42
As of late May, 2021, Sublime Text 4 has been released. As a result, the old solution to installing Sublime Text 3 via Homebrew will now install Sublime Text 4 instead. If this is what you actually want, then the following brew
installation command will install it:
brew install --cask sublime-text
Currently, there is no available cask on Homebrew which will allow the installation of Sublime Text 3 instead of Sublime Text 4.
As a side note, Sublime Text 2 is available in the sublime-text2
cask.
Historical note: This question originally was motivated by the fact that the sublime-text
cask was Sublime Text 2 instead of Sublime Text 3. As of around May 2016, this is no longer the case.

- 2,953
- 3
- 28
- 42
-
1Yes, as of [this](https://github.com/caskroom/homebrew-cask/commit/f577fe715cf73e03d1316c202be1db266682506c) commit, sublime text 3 is now the default. – jdek Jul 09 '16 at 10:59
-
-
2Or for newer versions of brew use: `brew install --cask sublime-text`. – rfreytag Apr 23 '21 at 12:07
-
@rfreytag Of course, updating my answer. Thanks for the reminder. – taylorthurlow Apr 23 '21 at 16:48
An update
Turns out now brew cask install sublime-text
installs the most up to date version (e.g. 3) by default and brew cask
is now part of the standard brew
-installation.

- 1
- 1

- 7,003
- 7
- 40
- 53
$ brew tap caskroom/cask
$ brew install brew-cask
$ brew tap caskroom/versions
$ brew cask install sublime-text

- 5,746
- 14
- 30
- 37

- 274
- 4
- 11
-
5
-
1Yes jsalonen, you are right, I will update my answer. Thank you – Abdulla Abu Zakham May 29 '16 at 13:59
-
`$ brew install brew-cask` warns `You must uninstall this formula. It is no longer needed to stay up to date, as Homebrew now takes care of that automatically.` – Snekse Jul 12 '16 at 21:10
Edit: The command will now install version 4 instead of 3
To install Sublime Text 3 4 run:
brew install --cask sublime-text
reference: https://formulae.brew.sh/cask/sublime-text

- 1,212
- 11
- 25
As per latest updates, caskroom packages have moved to homebrew. So try following commands:
brew tap homebrew/cask
brew cask install sublime-text
These 2 terminal commands will be enough for installing sublime.

- 591
- 7
- 12
Please note that brew cask <command>
was deprecated in favor of brew <command> --cask
in Homebrew 2.6.0
. So as of 2021, you can use:
brew install --cask sublime-text

- 7,531
- 2
- 25
- 31
As of 12-12-2022 I have just installed sublime-text using:
brew install sublime-text
No issue with working with sublime after the installation. Have just checked this. So I am not sure if you need 'cask' anymore.

- 11
- 1