Skip to content

Is it safe to delete Go build cache?

Compiled packages and test results that the go command keeps so later builds and tests run faster.

Safe

Its owner recreates it by itself when it needs it, and nothing you made is lost.

~/Library/Caches/go-build

What it is

The go command stores build outputs and test results here and reuses them when the inputs haven't changed. It removes entries it hasn't used recently on its own, and it rebuilds anything that's missing, so nothing you made is lost.

If it's removed

The next builds and test runs are slower while Go fills the cache again.

How it's removed

Go's own cleanup command (go clean -cache), run by the app.

PRO

The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It starts checked in the Cleanup checklist, except inside Documents or Desktop.

Sources

Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.