How to stop .NET Core from collecting data to protect privacy?

11,139

Short answer:

Issuing this command should disable telemetry:

export DOTNET_CLI_TELEMETRY_OPTOUT=1

More details:

This is the output from running the dotnet new as the first command.

Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% .... ms
Expanding 100% .... ms

More information can be obtained from the sources and the pull request for telemetry feature

DOTNET_CLI_TELEMETRY_OPTOUT

Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft. true to opt-out of the telemetry feature (values true, 1 or yes accepted); otherwise, false (values false, 0 or no accepted). If not set, it defaults to false, that is, the telemetry feature is on.

It is good to know where .NET Core creates its cache.

Share:
11,139

Related videos on Youtube

Ho1
Author by

Ho1

Updated on September 18, 2022

Comments

  • Ho1
    Ho1 almost 2 years

    Today Microsoft announced that .NET Core is available for installation on various platforms. Here's the website for .NET Core

    And this is the download section for Ubuntu 14.04 LTS (Trusty) and 16.04 LTS (Xenial)

    After installing .NET Core using these commands for Ubuntu 16.04 (Xenial)

    sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
    sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
    sudo apt-get update
    sudo apt-get install dotnet-dev-1.0.0-preview2-003121
    

    I got this message:

    This software may collect information about you and your use of the software, and send that to Microsoft. Please visit http://aka.ms/dotnet-cli-eula for more information.

    Is there a way to disable data collection? There can be many reasons for disabling data collection by .NET, but privacy concerns are very important.

    • Jos
      Jos almost 8 years
      Use tcpdump to see where the data is collected. Then block outgoing connections to that address.
  • Alex Stragies
    Alex Stragies over 6 years
    To Downvoter: Can you explain why, please?
  • Marc.2377
    Marc.2377 about 5 years
    I have this on a script at /etc/profile.d/ to work for all users and shells.
  • chx101
    chx101 over 2 years
    What about .NET 6 SDK? This software may collect information about you and your use of the software, and send that to Microsoft.