$ go clean [-i] [-r] [-n] [-x] [build flags] [packages] $ go help clean
remove the corresponding installed archive or binary (what 'go install' would create).
print the remove commands it would execute, but not run them
be applied recursively to all the dependencies of the packages named by the import paths.
print remove commands as it executes them
remove the entire go build cache
expire all test results in the go build cache
remove the entire module download cache, including unpacked source code of versioned dependencies.