Skip to main content

Use Homebrew to install dbt

dbt Labs maintains Homebrew formulae for the four oldest and most popular adapter plugins: Postgres, Redshift, Snowflake, and BigQuery.

We recommend you use Homebrew if you meet these conditions:

  • You use MacOS for local development
  • You use dbt with one of the four databases listed above
  • You're not sure if you have system requirements (such as Python 3) already installed, and don't care to manage them by hand

If that sounds like you, great! Homebrew makes it significantly easier to install dbt Core. Note that:

  • Installation with Homebrew can take longer than installing with other methods, because brew takes care of more setup behind the scenes
  • If you're using an M1 Mac, we recommend that you install dbt via Homebrew with Rosetta. This is necessary for certain dependencies that are only supported on Intel processors.

If you're someone who prefers to manage Python environments yourself, such as having multiple versions of Python to switch between, we recommend you install dbt Core via pip instead.

Installing with Homebrew#

Install Homebrew. Then run this one-time setup:

brew updatebrew install gitbrew tap dbt-labs/dbt

Now you're ready to install dbt. Once you know which adapter you're using, you can install it as dbt-<adapter>. For instance, if using Postgres:

brew install dbt-postgres

Everywhere below that you see <adapter>, replace it with the adapter name you're using.

Note: If you're using an adapter that isn't available as a Homebrew formula, we recommend you use pip instead.

Upgrading dbt and your adapter#

To upgrade dbt, use:

brew updatebrew upgrade dbt-<adapter>

Switching versions#

You can install and use multiple versions of dbt with Homebrew through something called Homebrew "links." To allow installation of another version of dbt, first unlink the current version:

brew unlink dbt-<adapter>brew install dbt-<adapter>@1.0.0brew link dbt-<adapter>@1.0.0

Now, you can use dbt Core v1.0.0:

$ dbt --versioninstalled version: 1.0.0   latest version: 1.0.0
Up to date!
Plugins:  - <adapter>: 1.0.0

You can switch between versions by linking the one you want to use:

brew unlink dbt-<adapter>@1.0.0brew link dbt-<adapter>@0.21.1