Skip to content

/usr/local was 2.8 GB on an Apple Silicon Mac that does not use it for Homebrew

On Apple Silicon, Homebrew lives in /opt/homebrew, so what fills /usr/local is installers. Measured at 2.83 GB, most of it global npm packages.

4 min read

/usr/local is hidden in Finder and absent from System Settings' storage view. On an Intel Mac it was where Homebrew put everything. On Apple Silicon Homebrew moved to /opt/homebrew, but /usr/local did not become empty: it is where package installers and some version managers write.

FolderSizePut there by
lib/node_modules2.27 GBGlobal npm packages
aws-cli217 MBThe AWS CLI installer package
n176 MBThe n Node version manager, holding Node 22.14.0
bin112 MBCommand-line tools
include53 MBNode headers

Check yours

du -sh /usr/local/* 2>/dev/null | sort -h

# What is on your PATH from here
ls -la /usr/local/bin | head -40

Entries in /usr/local/bin are often symlinks. ls -la shows where each points, which tells you what installed it.

What to do with it

  • lib/node_modules is global npm packages for the Node that lives here. See global npm packages taking up space.
  • Two Node installs. On this Mac, n had installed Node here while Homebrew had installed another. Pick one. Version managers covers the trade-off.
  • A leftover Intel Homebrew shows up as /usr/local/Homebrew and /usr/local/Cellar on a Mac migrated from Intel. Apple Silicon Homebrew does not use it. See Homebrew packages taking up space.
  • Installer packages such as the AWS CLI have their own uninstall steps. Deleting their folder alone can leave a broken symlink in bin.

Common questions

What is /usr/local used for on an Apple Silicon Mac?

Not for Homebrew, which uses /opt/homebrew. It holds tools from installer packages and version managers, and global npm packages for Node installed there.

Is it safe to delete things in /usr/local?

It is not part of macOS, so nothing breaks the system. Remove tools with their own uninstaller where one exists, so no broken links are left in /usr/local/bin.

Why is /usr/local so big?

On the Mac measured, 2.27 GB of its 2.83 GB was global npm packages in /usr/local/lib/node_modules.

Why do I have both /usr/local and /opt/homebrew?

Homebrew uses /opt/homebrew on Apple Silicon, while installers and some version managers still write to /usr/local, so most developer Macs have both.

Read next