go-mod-upgrade
August 23, 2026 · View on GitHub
Update outdated Go dependencies interactively

Note that only patch and minor updates are supported for now.
Why
The Go wiki has a great section on How to Upgrade and Downgrade Dependencies. One can run the command
go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null
to view available upgrades for direct dependencies. Unfortunately, the output is not actionable, i.e. we can't easily use it to update multiple dependencies.
This tool is an attempt to make it easier to update multiple dependencies interactively. This is similar to yarn upgrade-interactive, but for Go.
Install
Pre-compiled binaries for Windows, OS X and Linux are available in the releases page.
Alternatively, with the Go toolchain, you can do
go install github.com/oligot/go-mod-upgrade@latest
Usage
In a Go project which uses modules, you can now run
go-mod-upgrade
List available upgrades
To see what upgrades are available without any interactivity, use the --list flag:
go-mod-upgrade --list
This will display all available module upgrades using the same color coding as the interactive mode, making it perfect for CI/CD pipelines or when you just want to check what's available.
Colors in module names help identify the update type:
- yellow for a minor update
- green for a patch update
- red for a prerelease update
Additional options can be specified via the CLI global options:
GLOBAL OPTIONS:
--pagesize value, -p value Specify page size (default: 10)
--force, -f Force update all modules in non-interactive mode (default: false)
--list, -l List available module upgrades without interactivity (default: false)
--verbose, -v Verbose mode (default: false)
--hook value Hook to execute for each updated module
--ignore value, -i value Ignore modules matching the given regular expression
--help, -h show help (default: false)
--version print the version (default: false)
Breaking change since v0.13.0:
--ignorevalues are treated as regular expressions, matching the flag's documented behaviour. They used to be matched as plain substrings, so a value containing a regex metacharacter now means something different. An unanchored pattern such asapexstill matches anywhere in the module path; anchor it with^…$to match a whole path. An invalid pattern is now a hard error — the command reports it and exits non-zero before doing any work, where a substring never could be invalid.
Integration
You may also use go-mod-upgrade with these tools: