Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I uninstall dotnet core from macOS Sierra

Tags:

I have tried to install dotnet core, but it does not worked. So, I would like to uninstall it and start refresh. How can I uninstall dotnet core from macOS Sierra(10.12.3).

you can find below, existing dotnet core info on the system

/usr/local/share/dotnet/sdk$ ls -la total 0 drwxr-xr-x    4 root  wheel   136 May 20 18:28 . drwxr-xr-x   10 root  wheel   340 May 20 20:44 .. drwxr-xr-x  142 root  wheel  4828 May 20 20:44 1.0.4 drwxr-xr-x  121 root  wheel  4114 May  9 23:04 2.0.0-preview1-005977   /usr/local/share/dotnet/sdk$ sudo find / -name dotnet find: /dev/fd/sdk: No such file or directory find: /dev/fd/sdk: No such file or directory /private/etc/paths.d/dotnet /Users/melihtt/.dotnet/NuGetFallbackFolder/microsoft.codeanalysis.analyzers/1.1.0/analyzers/dotnet /Users/melihtt/.dotnet/optimizationdata/2.0.0-preview1-005977/osx.10.12-x64/dotnet /usr/local/share/dotnet /usr/local/share/dotnet/dotnet /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.5/dotnet /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.2/dotnet 
like image 509
clockworks Avatar asked May 20 '17 18:05

clockworks


People also ask

Can I uninstall Microsoft .NET Core runtime?

NET Runtime updates are compatible with the latest major version of the . NET SDKs. This means that you can remove safely the older versions. To remove the unuseful version of the SDKs and runtimes, you can use the dotnet-core-uninstall tool.

Can I uninstall .NET framework?

NET Framework is an operating system component and cannot be independently uninstalled. Updates to the . NET Framework appear in the Installed Updates tab of the Control Panel Programs and Features app.


1 Answers

To uninstall dotnet core from macOS:

  1. download dotnet-uninstall-pkgs.sh from https://github.com/dotnet/sdk/blob/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
  2. make dotnet-uninstall-pkgs.sh executable
  3. execute dotnet-uninstall-pkgs.sh as root (requires superuser privileges to run).
curl -O https://raw.githubusercontent.com/dotnet/sdk/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh chmod u+x dotnet-uninstall-pkgs.sh sudo ./dotnet-uninstall-pkgs.sh 
like image 150
kimbaudi Avatar answered Sep 19 '22 06:09

kimbaudi