115

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
  • 1
    Why isn't 3 the default in the normal cask. So weird Commented Oct 22, 2015 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. Commented Jul 12, 2016 at 21:16

9 Answers 9

189
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.

Sign up to request clarification or add additional context in comments.

9 Comments

Actually needed this tap: caskroom/versions
Thanks. Also, for what it's worth, you can tap and install in one command like this: brew cask install caskroom/versions/sublime-text3
Ok, but you need the "cask" plugin before : brew install caskroom/cask/brew-cask
Sublime text is 3114 now. So the last step should be replaced with brew cask install sublime-text
Try brew cask install sublime-text when getting No available Cask for sublime-test3.
|
103

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.

4 Comments

Yes, as of this commit, sublime text 3 is now the default.
then use Caskroom/versions/sublime-text2
Or for newer versions of brew use: brew install --cask sublime-text.
@rfreytag Of course, updating my answer. Thanks for the reminder.
37

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.

Comments

16
$ brew tap caskroom/cask
$ brew install brew-cask
$ brew tap caskroom/versions
$ brew cask install sublime-text

3 Comments

Doesn't work unless you run brew tap caskroom/versions too.
Yes jsalonen, you are right, I will update my answer. Thank you
$ 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.
5

I did not have brew cask installed so I had to install it first,so these were the steps I followed:

brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install sublime-text

Comments

5

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

Comments

4

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.

Comments

3

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

1 Comment

Above is the correct answer as of 2022-11-07.
2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.