Scroll to navigation

GO-GET(1) General Commands Manual GO-GET(1)


go - tool for managing Go source code


go get [-a] [-d] [-fix] [-n] [-p n] [-u] [-v] [-x] [ packages ]


Get downloads and installs the packages named by the import paths, along with their dependencies.

When checking out or updating a package, get looks for a branch or tag that matches the locally installed version of Go. The most important rule is that if the local installation is running version "go1", get searches for a branch or tag named "go1". If no such version exists it retrieves the most recent version of the package.


The -a, -n, -v, -x, and -p flags have the same meaning as in 'go build' and 'go install'. See go-build(1).
The -d flag instructs get to stop after downloading the packages; that is, it instructs get not to install the packages.
The -fix flag instructs get to run the fix tool on the downloaded packages before resolving dependencies or building the code.
The -u flag instructs get to use the network to update the named packages and their dependencies. By default, get uses the network to check out missing packages but does not use it to look for updates to existing packages.

For more about specifying packages, see go-packages(7).

For more about how 'go get' finds source code to download, see go-remote(7).


go-build(1), go-install(1), go-clean(1).


This manual page was written by Michael Stapelberg <>, for the Debian project (and may be used by others).