How to download and install Deno on Mac

Deno is a runtime for JavaScript and TypeScript with a formatter, linter and test runner built in, installed with one Terminal command from Deno’s official documentation. Here is how to install it, check it and keep it updated.

Deno

  • macOS 12 or later
  • Apple Silicon and Intel
  • Free, open source

The links go to the developer’s website (docs.deno.com). MacWashing is not affiliated with the developer and keeps no installers.

Open Terminal (Applications › Utilities) and run:

brew install deno

Homebrew downloads the app from the developer’s server, checks the file and puts the app in Applications.

No Homebrew yet? How to install Homebrew: one command from brew.sh.

Before you start

Deno is a single program with no external dependencies. Its Mac builds need macOS 12 or later and run on Apple Silicon and Intel. The install script picks the right one by itself.

The command below is from Deno’s official documentation at docs.deno.com. Don’t run install commands copied from other sites.

Install Deno with one command

  1. Open Terminal: Applications › Utilities › Terminal, or press Command-Space and type Terminal.
  2. Copy the command below, paste it into Terminal and press Return.
  3. The script puts Deno in ~/.deno/bin and offers to edit your shell configuration so Terminal finds deno. Accept it.
  4. Open a new Terminal window so it picks up the change.
curl -fsSL https://deno.land/install.sh | sh

Check and update Deno

In the new Terminal window, check that Deno runs:

deno --version
  • Updates. If you installed Deno with the script, update it with: deno upgrade If you installed it with Homebrew, use this instead: brew upgrade deno
  • Cache. Deno keeps downloaded dependencies and compiled files in ~/Library/Caches/deno. This shows the folder in use: deno info And this empties it: deno clean

If Deno doesn’t work

  • «command not found: deno». Open a new Terminal window: the script changes your shell configuration, and open windows don’t see it. If it still fails, check that ~/.deno/bin is in the list this prints: echo $PATH
  • Deno fails on an older Mac. Check your macOS version in About This Mac: Deno needs macOS 12 or later.
  • Two copies of Deno. If you installed Deno both with the script and with Homebrew, this shows which one runs: which deno Keep one of them.
  • Start over. To remove Deno installed with the script, empty its cache first: deno clean Then delete the ~/.deno folder, remove the line with .deno/env from ~/.zshrc and install it again.

Alternatives to Deno

Keep your Mac tidy

MacWashing, System Junk: Xcode junk, user caches, installers and logs found, 22.83 GB ready to be cleaned

Runtimes and other developer tools keep caches that grow with every project. System Junk in MacWashing finds the caches apps and developer tools build up and shows how much space they take.

Free trial · macOS 14 or later

Questions and answers

Is Deno free?

Yes. Deno is free and open source.

Should I use the script or Homebrew?

Deno’s documentation lists both. The script installs Deno into your home folder, and Deno updates itself with deno. Homebrew installs and updates it with brew. There is no app to download: Deno is a Terminal tool.

Does Deno run Node.js code?

Mostly, yes. Deno supports nearly all of Node.js’s built-in modules and can use npm packages, so many Node.js projects run with it.