macOS卸载.net core 8.0


title: macOS卸载.net core 8.0
date: 2024-08-07 00:27:50
tags: 解决办法


用官方的卸载工具:

说明页面

https://learn.microsoft.com/zh-cn/dotnet/core/additional-tools/uninstall-tool?tabs=macos

源代码页面

https://github.com/dotnet/cli-lab

下载页面

https://github.com/dotnet/cli-lab/releases/tag/1.7.521001

下载dotnet-core-uninstall.tar并解压缩到文件夹中,比如temp

打开终端,导航到该文件夹

执行:

./dotnet-core-uninstall -h查看该工具所有命令

./dotnet-core-uninstall list查看安装的所有.net版本

输出:

xxx@MacBook-Pro temp % ./dotnet-core-uninstall list

This tool cannot uninstall versions of the runtime or SDK that are installed using zip/scripts. The versions that can be uninstalled with this tool are:

.NET Core SDKs:
  8.0.202  (arm64)  [Used by Visual Studio for Mac. Specify individually or use —-force to remove]

.NET Core Runtimes:
  8.0.3  (arm64)  [Used by Visual Studio for Mac or SDKs. Specify individually or use —-force to remove]

然后执行

./dotnet-core-uninstall dry-run 8.0.3 --runtime

./dotnet-core-uninstall dry-run 8.0.202 --sdk

进行试运行,版本号要和list输出的一致

提示可以删除的话,执行以下删除命令,版本号依旧要一致:

前面加sudo获取最大权限

sudo ./dotnet-core-uninstall remove 8.0.202 --sdk

sudo ./dotnet-core-uninstall remove 8.0.3 --runtime

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值