# Go module cache

Source: https://diskcity.app/folders/go-mod-cache

**Safe to delete.** Yes. Go downloads modules again on the next build.

## What it is

Go's module cache holds downloaded module sources and is read-only on disk; go clean -modcache is Go's own way to empty it.

Your projects and go.sum files stay; Go fetches modules again when they build.

## Where it is

- `~/go/pkg/mod`

## How big is it?

```sh
du -sh "$HOME/go/pkg/mod"
```

## How to remove it

1. Quit go, gopls first.
2. Use the tool's own command, which knows what's still in use: `go clean -modcache`

## What DiskCity does with it

DiskCity removes it with the tool's own command, when you approve, or on its own if you turn on Autopilot. It waits until go is closed.

## Sources

- https://go.dev/ref/mod#module-cache

Checked 2026-10-23.
