如何使用Go模块删除已安装的软件包

I've installed a package using go modules (go get in Go 1.13) and now I want to remove it. In the documentation there is nothing about this and in go get docu neither.

Removing the package from go.mod manually doesn't solve the issue so it remains in go.sum.

How should I remove a package in a clean why?

Found it https://blog.golang.org/using-go-modules#TOC_7.

go mod tidy

So basically, once the package is not being imported in any package you can perform a go mod tidy and it will safely remove the unused depencies.

清理所有缓存,彻底清理,https://www.codecomeon.com/posts/100/

go mod 删除已下载的模块