Removing dependencies

  1. Run go mod tidy: Next, run the go mod tidy command in your terminal. This command will scan your project’s go.mod file and remove any unused dependencies. If the package you removed wasn’t being used, go mod tidy will automatically remove it from the go.mod file as well.
1 Like