由于目前没有找到一个合适的办法,将本机.NET Core的版本升级到1.1,故只有先卸载再安装最新版本了。

卸载脚本链接为:https://github.com/dotnet/cli/blob/rel/1.0.0/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh

#!/usr/bin/env bash
#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" current_userid=$(id -u)
if [ $current_userid -ne 0 ]; then
echo "$(basename "$0") uninstallation script requires superuser privileges to run" >&2
exit 1
fi # this is the common suffix for all the dotnet pkgs
dotnet_pkg_name_suffix="com.microsoft.dotnet"
dotnet_install_root="/usr/local/share/dotnet"
dotnet_path_file="/etc/paths.d/dotnet" remove_dotnet_pkgs(){
installed_pkgs=($(pkgutil --pkgs | grep $dotnet_pkg_name_suffix)) for i in "${installed_pkgs[@]}"
do
echo "Removing dotnet component - \"$i\"" >&2
pkgutil --force --forget "$i"
done
} remove_dotnet_pkgs
[ "$?" -ne 0 ] && echo "Failed to remove dotnet packages." >&2 && exit 1 echo "Deleting install root - $dotnet_install_root" >&2
rm -rf "$dotnet_install_root"
rm -f "$dotnet_path_file" echo "dotnet packages removal succeeded." >&2
exit 0

执行的时候,需要chmod 777

macOS Sierra 如何卸载.net core 版本的更多相关文章

  1. 如果将 macOS Mojave 降级为 macOS Sierra 或者更低版本

    当前系统是10.14,我想装回10.11 办法: 1. 下载10.11, 我是从themacgo网站下载的 https://themacgo.com/macos-sierra-10-12-1-dmg- ...

  2. 在macOS Sierra 10.12搭建PHP开发环境

    macOS Sierra 11.12 已经帮我们预装了 Ruby.PHP(5.6).Perl.Python 等常用的脚本语言,以及 Apache HTTP 服务器.由于 nginx 既能作为 HTTP ...

  3. 【Ruby】【环境搭建】macOS Sierra 10.12.6 + Xcode 8 + gpg 2.2.8 + rvm 1.29.3 + Ruby 2.4.0 + RubyMine 2018.1.4

      按出场顺序: macOS Sierra 10.12.6  +  Xcode 8 + gpg 2.2.8 + rvm 1.29.3 +  Ruby 2.4.0 + RubyMine 2018.1.4 ...

  4. macOS Sierra 10.12.4 (16E195) - Clover [ 20170403 ]

    原文:https://user.qzone.qq.com/753313822/blog/1424460141?_t_=0.48652242555134495 建议使用 1920 * 1080 屏幕分辨 ...

  5. macOS Sierra安装Apache2.4+PHP7.0+MySQL5.7.16

    Mac系统上虽然自带PHP和Apache,但是有时不是我们想要的版本呢.今天我们就在macOS Sierra(10.12.1)上安装比较新的版本的PHP版本,也就是PHP7.0+了.本篇博客我们安装的 ...

  6. macOS Sierra(10.12.6), odoo(11.0), Python(3.5.4)配置

    欣闻odoo11支持python3环境了,赶紧在mac平台尝试一下: 前期设置,参考另篇文章:macOS Sierra 10.12.6 odoo 10.0 开发环境配置 因为odoo11尚未正式发布, ...

  7. macOS Sierra上面的php开发环境安装

    本文参考资料: 启动apache时,解决  How to Fix AH00558 and AH00557 httpd apr_sockaddr_info_get() Error Message     ...

  8. 【转】如何在VMware上安装macOS Sierra 10.12

    本文主要介绍目前网络上比较流行的使用预安装镜像安装macOS 10.12的方法,并以9月20号发布的最新GM版本16A323为例. 安装方案 破解VMware 创建虚拟机,加载预安装镜像 初始化mac ...

  9. macOS Sierra Git Gui Crash 解决方法

    本篇文章由:http://xinpure.com/macos-sierra-git-gui-crash-solution/ 问题描述 自从升级到 macOS Sierra 10.12 之后,git g ...

随机推荐

  1. NineveGL引擎学习笔记

  2. 关于java异常处理的自我学习

    算术异常类:ArithmeticExecption 空指针异常类:NullPointerException 类型强制转换异常:ClassCastException 数组负下标异常:NegativeAr ...

  3. FIlter(2)—案例

    案例 demo2,login.jsp请求提交到hello.jsp,该页面中有两个text,分别使用两个Filter链拦截,验证账号密码是否正确,把账号密码设置到Filter初始化参数中 login.j ...

  4. 11、jQuery其余操作

    上篇主要介绍了jQuery,和一些基本用法,这篇主要讲解动画.常用事件.还有一些jQuery的补充内容. 本篇导航: 动画 常用事件 插件 jQuery API 中文文档 一.动画 1.基本 show ...

  5. app保存图片到用户相册时闪退解决办法

    在iOS11中,app保存图片到用户相册时必须添加权限使用描述即NSPhotoLibraryAddUsageDescription,否则会闪退. 只需在info.plist—Property List ...

  6. Unity中InitializeOnLoad属性的妙用

    InitializeOnLoad 属性应用的对象是 静态构造函数,它可以保证在编辑器启动的时候调用此函数.根据这个特性,可以在编辑器中设置定期的回调(帧更新),来实现类似watchFile的功能.这里 ...

  7. layui常见问题记录

    1.用js选中checkbox,没有效果 解决方式:加入 form.render(); 重新渲染表单 $(this).prop('checked', true); //在新版本的jquery中,如果是 ...

  8. MOS管当开关控制时,为什么一般用PMOS做上管NMOS做下管?

    了解MOS管的开通/关断原理你就会发现,使用PMOS做上管.NMOS做下管比较方便.使用PMOS做下管.NMOS做上管的电路设计复杂,一般情况下意义不大,所以很少采用. 下面先了解MOS管的开通/关断 ...

  9. 关于VC预定义常量_WIN32,WIN32,_WIN64

    VC2012 下写 Windows 程序时,有时需要判断编译环境.在之前的文章<判断程序是否运行在 Windows x64 系统下.>里说过如何在运行期间判断系统环境,但在编译时如何判断? ...

  10. myBase7 激活方法

    一.引言: 之前使用过一段时间的myBase,那时候发现还不太美观,所以弃用了一段时间,最近看到有myBase7出来,使用了一下感觉还可以,但是只能试用一个月,不过还好找到了破解的方法. 二.破解步骤 ...