When I enable gomodules and build my go program then the required packages are downloaded.
But I cannot find them in $GOPATH/src/ or in $GOPATH/s
$GOPATH/src/
$GOPATH/s
To determine cache locations, you can use go env:
go env|grep CACHE
To clean the caches, use go clean -modcache or go clean -cache depending on the type of cache to be cleared.
go clean -modcache
go clean -cache