Is it safe to delete Bazel output base?

/private/var/tmp/_bazel_<user> · Safe to delete

What it is

Bazel's output base: build outputs, the action cache and downloaded external repositories.

Can you delete it?

Yes, it is rebuilt automatically. Bazel rebuilds everything on the next build, which can take a long time on big projects.

How to clean it safely

  1. Run: bazel clean --expunge
  2. Run it inside each workspace, or delete the folder when no Bazel build is running.

Step-by-step guide: Developer caches on a Mac →

Questions

Is it safe to delete /private/var/tmp/_bazel_<user>?

Yes, it is rebuilt automatically. Bazel rebuilds everything on the next build, which can take a long time on big projects.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac