.net core 如何从macOS Sierra卸载dotnet core

.net core 如何从macOS Sierra卸载dotnet core,.net-core,macos-sierra,.net Core,Macos Sierra,我曾尝试安装dotnetcore,但没有成功。因此,我想卸载它并开始刷新。如何从macOS Sierra(10.12.3)卸载dotnet core 您可以在下面找到系统上现有的dotnet核心信息 /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-x

我曾尝试安装dotnetcore,但没有成功。因此,我想卸载它并开始刷新。如何从macOS Sierra(10.12.3)卸载dotnet core

您可以在下面找到系统上现有的dotnet核心信息

/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

要从macOS卸载dotnet core,请执行以下操作:

  • 下载
    dotnet卸载pkgs.sh
  • 使
    dotnet卸载pkgs.sh
    可执行
  • 以root用户身份执行
    dotnet uninstall pkgs.sh
    (需要超级用户权限才能运行)
  • curl-Ohttps://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
    chmod u+x dotnet-uninstall-pkgs.sh
    sudo./dotnet-uninstall-pkgs.sh
    
    您还可以使用dotnet core卸载工具,该工具允许您选择要删除的特定SDK或运行时版本

    如果在安装.Net 5 SDK的预览版本后,在构建Xamarin.Mac时遇到问题,您可能希望删除Mono和Visual Studio,然后尝试从头重新安装


    祝你好运

    你可以删除目录
    /usr/local/share/dotnet
    /Users/melihtt/.dotnet
    。此外,您可能需要删除
    /Users/melihtt/.nuget
    ,并清理任何剩余的缓存nuget软件包。只需删除所有的dotnet文件夹..NET Core卸载工具,谢谢。官方的卸载程序二进制文件不能帮我解决这个问题,但是你提供的链接清理了我的系统。