Configuring pub environment variables

Environment variables allow you to customize pub to suit your needs.

Some of pub's dependencies are downloaded to the pub cache. By default, this directory is located under $HOME/.pub-cache (on macOS and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows). (The precise location of the cache may vary depending on the Windows version.) You can use the PUB_CACHE environment variable to specify another location. For more information, see The system package cache.
Pub downloads dependencies from the site. To specify the location of a particular mirror server, use the PUB_HOSTED_URL environment variable. For example:

For more information about using a private package repository, see Overriding the default package repository.