Go CLI Modules and Workspaces/Verify module cache

Verify dependencies in module cache against go.sum.

Section: Dependency Updates

Verify module cache

bash
bash
go mod verify
Explanation

Verify dependencies in module cache against go.sum. Useful in Go CLI workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Dependency Updates
Exclude bad version
Exclude a dependency version from selection.
OpenIn sheetbashsame section
Upgrade dependency
Update a dependency to the latest version.
OpenIn sheetbashsame section
Upgrade patch release
Update a dependency within its compatible patch/minor range.
OpenIn sheetbashsame section
List available updates
Show modules that have newer versions available.
OpenIn sheetbashsame section
Initialize module
Create a new go.mod for the current project.
OpenIn sheetbash2 tag match
Add replace directive
Point a module dependency to a local checkout.
OpenIn sheetbash2 tag match