sh Homebrew重新安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Homebrew重新安装相关的知识,希望对你有一定的参考价值。

#!/bin/sh
# Brew uninstall -Jahhein

echo "Are you positive you wish to remove brew? Your brews and casks will
  be placed into a text file. As always, be sure to trust any shell script you run!"

read -r -p "Are you sure? [y/N] " response
case $response in
  [yY][eE][sS]|[yY])
  # Create a brews list of formula and casks.
  echo "Setting up previously installed brews at ~/Desktop/brewslist.txt"
  brew list > ~/Desktop/brewslist.txt
  echo "Appending brew casks to brewlist.txt"
  brew cask list >> ~/Desktop/brewslist.txt

  echo "Removing Cellar"
  cd `brew --prefix`
  rm -rf Cellar
  brew prune
  rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
  rm -rf ~/Library/Caches/Homebrew

  echo "Reinstalling brew, checkout your text file on the Desktop to reinstall your brews."
  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

*)

  # Not uninstalled
  echo "Homebrew was not removed."
esac

以上是关于sh Homebrew重新安装的主要内容,如果未能解决你的问题,请参考以下文章

Homebrew1.5之后安装PHP和扩展

【工具】Homebrew的安装及使用

sh 通过Homebrew安装Redis

sh 安装Homebrew

sh 安装homebrew文件

sh 安装和设置Homebrew