How to Turn Off Hugging Face Telemetry with HF_HUB_DISABLE_TELEMETRY
Hugging Face libraries such as Transformers and datasets send some usage information to Hugging Face by default. If you'd rather they didn't, one environment variable turns it off for all of them. This guide checks the setting before and after with huggingface_hub 2.5.0, in bash and PowerShell.
Syntax
export HF_HUB_DISABLE_TELEMETRY=1
| Part | What it means |
|---|---|
HF_HUB_DISABLE_TELEMETRY=1 | Turns telemetry off for every Hugging Face library that runs in this terminal |
DO_NOT_TRACK=1 | The general-purpose alternative, which Hugging Face honours too |
The environment variable reference explains: "By default, some data is collected by HF libraries (transformers, datasets, gradio,..) to monitor usage, debug issues and help prioritize features. Each library defines its own policy (i.e. which usage to monitor) but the core implementation happens in huggingface_hub", and "You can set HF_HUB_DISABLE_TELEMETRY=1 as environment variable to globally disable telemetry." DO_NOT_TRACK is "Equivalent to HF_HUB_DISABLE_TELEMETRY".
The Example
A small project reads the setting from Python before and after the variable is set. huggingface_hub exposes it as constants.HF_HUB_DISABLE_TELEMETRY.
Prerequisites
- uv. This guide uses uv 0.13.10 with Python 3.15.2.
Step 1: Create a Project
uv init --python 3.15 telemetry-demo
cd telemetry-demo
uv add huggingface_hub
Step 2: Check the Default
uv run python -c "from huggingface_hub import constants; print(constants.HF_HUB_DISABLE_TELEMETRY)"
False

False: telemetry isn't disabled, which is the default.
Step 3: Turn It Off
- macOS / Linux (bash, zsh)
- Windows (PowerShell)
export HF_HUB_DISABLE_TELEMETRY=1
uv run python -c "from huggingface_hub import constants; print(constants.HF_HUB_DISABLE_TELEMETRY)"
$env:HF_HUB_DISABLE_TELEMETRY = "1"
uv run python -c "from huggingface_hub import constants; print(constants.HF_HUB_DISABLE_TELEMETRY)"
True

True: telemetry is now off for every Hugging Face library you run from this terminal. The PowerShell version printed True too. In a new terminal, set it again, or add the line to your shell's startup file, such as ~/.zshrc.
The Other Switches
Two other ways lead to the same result:
DO_NOT_TRACK=1. In a fresh terminal,export DO_NOT_TRACK=1followed by the same check printedTrue. Other tools honour this variable too.- Offline mode. The library's own documentation for
send_telemetrysays: "Telemetry is also disabled in offline mode (i.e. when settingHF_HUB_OFFLINE=1)." The constant doesn't show it: with onlyHF_HUB_OFFLINE=1set, the check printedFalse. The sending function checks offline mode separately and sends nothing.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Setting the variable inside a Python program after importing Transformers | The library has already read it when it was imported | Set it in the terminal before the program starts |
Setting HF_HUB_DISABLE_TELEMETRY=0 to turn it off | 0 means "don't disable", so telemetry stays on | Use 1 |
| Expecting the setting to survive a new terminal | export and $env: last only for this terminal | Add it to your shell's startup file |
FAQ
Does turning telemetry off stop downloads from the Hub?
No. Downloads still work: telemetry is a separate set of usage reports. To stop all contact with the Hub, use offline mode, HF_HUB_OFFLINE=1.
What exactly is sent?
The documentation says each library "defines its own policy (i.e. which usage to monitor)". The shared function in huggingface_hub describes itself as one that "Sends telemetry that helps track usage of different HF libraries", and adds the library's name and version and information about installed packages to the request.
Conclusion
The setting read False by default and True once HF_HUB_DISABLE_TELEMETRY=1 was set, in bash and in PowerShell. DO_NOT_TRACK=1 and offline mode stop it as well.
Additional Resources
- HF_HUB_DISABLE_TELEMETRY — the environment variable reference.
- DO_NOT_TRACK — the general opt-out the libraries honour.
