What it is
Downloaded Go modules shared by all your Go projects.
Can you delete it?
Yes, it is rebuilt automatically. Go downloads modules again on the next build. The files are read-only, so use the go command, not Finder.
How to clean it safely
- See the size: du -sh ~/go/pkg/mod
- Run:
go clean -modcache
How big is it on your Mac?
This read-only command prints its size and changes nothing:
Terminal
du -sh ~/"go/pkg/mod" 2>/dev/nullStep-by-step guide: Developer caches on a Mac →
Related folders
- Turborepo cache ·
<project>/.turbo - Vite dependency cache ·
<project>/node_modules/.vite - npm cache ·
~/.npm - Hex packages (Elixir) ·
~/.hex - npx cache ·
~/.npm/_npx - Python __pycache__ ·
<project>/__pycache__
Questions
Is it safe to delete ~/go/pkg/mod?
Yes, it is rebuilt automatically. Go downloads modules again on the next build. The files are read-only, so use the go command, not Finder.
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