由于目前没有找到一个合适的办法,将本机.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. BZOJ2368 : Modern Art Plagiarism 树同构

    枚举$T_1$的树根,然后DP,设$f[i][j]$表示$T_1$的子树$i$是否存在包括i的连通子树与$T_2$的子树$j$同构. 若$j$是叶子,那么显然可以. 若$deg_i<deg_j$ ...

  2. token和盐

    // 盐,加密后密码获取    Map<String, String> map = new HashMap<String, String>();    map.put(&quo ...

  3. 3ds max学习笔记(十一)-- 修改器

    1.修改器列表: 将常用的修改器放放置在集里: 1.点击[配置]按钮,勾选[显示按钮] 选择[配置修改器集],在新出的弹窗里通过左右拖拽进行设置: 2,选择之后,点击[确定]进行保存:

  4. PAT Basic 1026

    1026 程序运行时间 (15 分) 要获得一个 C 语言程序的运行时间,常用的方法是调用头文件 time.h,其中提供了 clock() 函数,可以捕捉从程序开始运行到 clock() 被调用时所耗 ...

  5. 关于UITableView的一些老是忘记的小杂碎

    1:如何取消单元格的选中状态 简简单单的一句 [TableView deselectRowAtIndexPath:[TableView indexPathForSelectedRow] animate ...

  6. Linux命令之yum篇

    作业六:yum命令1) 自定义yum仓库:createrepo[root@localhost /]#mkdir /rpm_bak[root@localhost /]#cp /media/Package ...

  7. leetcode笔记--水箱问题

    类型的引用:Solution *s=new Solution(); 1.Container With Most Water Given n non-negative integers a1, a2, ...

  8. Codefoces909E Coprocessor(拓扑排序)

    http://codeforces.com/problemset/problem/909/E 由于分了两个queue,所以push的时候可以统一操作,不会影响彼此.两个queue相当于是平等的,只是q ...

  9. oracle--Tracing PL/SQL subprogram calls with parameters values--Mahmoud Hatem,

    https://mahmoudhatem.wordpress.com/2017/09/15/geeky-plsql-tracerprofiler-first-step/ https://mahmoud ...

  10. javaScript系列 [03]-javaScript原型对象

    [03]-javaScript原型对象 引用: javaScript是一门基于原型的语言,它允许对象通过原型链引用另一个对象来构建对象中的复杂性,JavaScript使用原型链这种机制来实现动态代理. ...