What it is
Go's cache of compiled packages and test results.
Can you delete it?
Yes, it is rebuilt automatically. go build rebuilds it.
How to clean it safely
- Run:
go clean -cache
How big is it on your Mac?
This read-only command prints its size and changes nothing:
Terminal
du -sh ~/"Library/Caches/go-build" 2>/dev/nullStep-by-step guide: Developer caches on a Mac →
Related folders
- golangci-lint cache ·
~/Library/Caches/golangci-lint - npx cache ·
~/.npm/_npx - NuGet packages (.NET) ·
~/.nuget/packages - Simulator caches ·
~/Library/Developer/CoreSimulator/Caches - Composer cache (PHP) ·
~/Library/Caches/composer - Flutter SDK cache ·
<flutter sdk>/bin/cache
Questions
Is it safe to delete ~/Library/Caches/go-build?
Yes, it is rebuilt automatically. go build rebuilds it.
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