Installing Dart on Mac

Homebrew is a package manager for macOS. With Homebrew, installing and updating Dart is easy.

Don’t want to use homebrew? Another option is downloading Dart manually.


The Dart SDK contains the VM, analyzer, formatter, documentation generator, package manager, and the core libraries.

Install homebrew, and then run:

$ brew tap dart-lang/dart
$ brew install dart

If you use Dart for web development work, you should also install Dartium and Content Shell:

$ brew tap dart-lang/dart
$ brew install dart --with-content-shell --with-dartium

Installing dev channel releases

To choose the dev channel version of whatever Dart software you install, use --devel:

$ brew install dart --devel

You can use any combination of the --devel, --with-dartium, and --with-content-shell options.


To update Dart once you’ve installed it using Homebrew, run:

$ brew update
$ brew upgrade dart
$ brew cleanup dart

Installation locations

Many tools, such as editors, ask you to specify the Dart SDK installation directory and the location of Dartium. Homebrew uses the following locations, where you replace HOMEBREW_INSTALL with the the homebrew installation directory (which you can get using brew --prefix):

  • SDK directory: HOMEBREW_INSTALL/opt/dart/libexec
  • Dartium: HOMEBREW_INSTALL/opt/dart/

Specifying a custom installation location

By default, Homebrew installs to /usr/local. If your Mac is set up so that installing to /usr/local requires using sudo, we recommend downloading to another location where you have write permissions, such as your home directory.

  1. Go to the directory above where you want Homebrew and Dart to live. For example, if you want Homebrew and Dart to live under ~/homebrew, go to ~.

    $ cd ~    # The directory that will contain Homebrew and Dart
  2. Clone Homebrew. This creates a homebrew directory.

    $ git clone
  3. Add the homebrew/bin directory to your PATH.

  4. Follow the brew instructions in Installing Dart. Dart will be installed under homebrew.