美文网首页
HomeBrew 卸载和安装

HomeBrew 卸载和安装

作者: 旅途开发者 | 来源:发表于2017-12-11 14:14 被阅读785次

    以下代码均是在终端操作

    卸载

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    

    卸载之后可以通过下面代码检查是否卸载

    /usr/local
    

    安装

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    安装的中间会让输入一次密码,输入即可

    以下是我安装时候的代码,现在卸载,再安装

    yang:~ yang$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    Warning: This script will remove:
    /usr/local/Cellar/
    /usr/local/Homebrew/
    /usr/local/Homebrew/.github/
    /usr/local/Homebrew/.gitignore
    /usr/local/Homebrew/.travis.yml
    /usr/local/Homebrew/.yardopts
    /usr/local/Homebrew/CONTRIBUTING.md
    /usr/local/Homebrew/LICENSE.txt
    /usr/local/Homebrew/Library/
    /usr/local/Homebrew/Library/Homebrew/test/.bundle/
    /usr/local/Homebrew/README.md
    /usr/local/Homebrew/bin/brew
    /usr/local/Homebrew/completions/
    /usr/local/Homebrew/docs/
    /usr/local/Homebrew/manpages/
    /usr/local/bin/brew -> /usr/local/Homebrew/bin/brew
    /usr/local/etc/bash_completion.d/brew -> /usr/local/Homebrew/completions/bash/brew
    /usr/local/share/doc/homebrew -> /usr/local/Homebrew/docs
    /usr/local/share/man/man1/brew-cask.1 -> /usr/local/Homebrew/manpages/brew-cask.1
    /usr/local/share/man/man1/brew.1 -> /usr/local/Homebrew/manpages/brew.1
    /usr/local/share/zsh/site-functions/_brew -> /usr/local/Homebrew/completions/zsh/_brew
    /usr/local/share/zsh/site-functions/_brew_cask -> /usr/local/Homebrew/completions/zsh/_brew_cask
    /usr/local/var/homebrew/locks/update
    Are you sure you want to uninstall Homebrew? This will remove your installed packages! [y/N] y
    ==> Removing Homebrew installation...
    ==> Removing empty directories...
    ==> /usr/bin/sudo /usr/bin/find /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var -name .DS_Store -delete
    Password:
    Sorry, try again.
    Password:
    ==> /usr/bin/sudo /usr/bin/find /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var -depth -type d -empty -exec rmdir {} ;
    ==> Homebrew uninstalled!
    The following possible Homebrew files were not deleted:
    /usr/local/bin/
    /usr/local/git/
    /usr/local/mysql -> /usr/local/mysql-5.7.20-macos10.12-x86_64
    /usr/local/mysql-5.7.20-macos10.12-x86_64/
    /usr/local/remotedesktop/
    /usr/local/share/
    You may wish to remove them yourself.
    yang:~ yang$ /usr/local
    -bash: /usr/local: is a directory
    yang:~ yang$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    ==> This script will install:
    /usr/local/bin/brew
    /usr/local/share/doc/homebrew
    /usr/local/share/man/man1/brew.1
    /usr/local/share/zsh/site-functions/_brew
    /usr/local/etc/bash_completion.d/brew
    /usr/local/Homebrew
    ==> The following new directories will be created:
    /usr/local/Cellar
    /usr/local/Homebrew
    /usr/local/Frameworks
    /usr/local/etc
    /usr/local/include
    /usr/local/lib
    /usr/local/opt
    /usr/local/sbin
    /usr/local/share/zsh
    /usr/local/share/zsh/site-functions
    /usr/local/var
    
    Press RETURN to continue or any other key to abort
    ==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
    Password:
    ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
    ==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
    ==> /usr/bin/sudo /usr/sbin/chown yang /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
    ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
    ==> /usr/bin/sudo /bin/mkdir -p /Users/yang/Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/chmod g+rwx /Users/yang/Library/Caches/Homebrew
    ==> /usr/bin/sudo /usr/sbin/chown yang /Users/yang/Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
    ==> /usr/bin/sudo /usr/sbin/chown yang /Library/Caches/Homebrew
    ==> Downloading and installing Homebrew...
    remote: Counting objects: 95503, done.
    remote: Total 95503 (delta 0), reused 0 (delta 0), pack-reused 95503
    Receiving objects: 100% (95503/95503), 21.80 MiB | 352.00 KiB/s, done.
    Resolving deltas: 100% (69335/69335), done.
    From https://github.com/Homebrew/brew
     * [new branch]      master     -> origin/master
     * [new tag]         0.1        -> 0.1
     * [new tag]         0.2        -> 0.2
     * [new tag]         0.3        -> 0.3
     * [new tag]         0.4        -> 0.4
     * [new tag]         0.5        -> 0.5
     * [new tag]         0.6        -> 0.6
     * [new tag]         0.7        -> 0.7
     * [new tag]         0.7.1      -> 0.7.1
     * [new tag]         0.8        -> 0.8
     * [new tag]         0.8.1      -> 0.8.1
     * [new tag]         0.9        -> 0.9
     * [new tag]         0.9.1      -> 0.9.1
     * [new tag]         0.9.2      -> 0.9.2
     * [new tag]         0.9.3      -> 0.9.3
     * [new tag]         0.9.4      -> 0.9.4
     * [new tag]         0.9.5      -> 0.9.5
     * [new tag]         0.9.8      -> 0.9.8
     * [new tag]         0.9.9      -> 0.9.9
     * [new tag]         1.0.0      -> 1.0.0
     * [new tag]         1.0.1      -> 1.0.1
     * [new tag]         1.0.2      -> 1.0.2
     * [new tag]         1.0.3      -> 1.0.3
     * [new tag]         1.0.4      -> 1.0.4
     * [new tag]         1.0.5      -> 1.0.5
     * [new tag]         1.0.6      -> 1.0.6
     * [new tag]         1.0.7      -> 1.0.7
     * [new tag]         1.0.8      -> 1.0.8
     * [new tag]         1.0.9      -> 1.0.9
     * [new tag]         1.1.0      -> 1.1.0
     * [new tag]         1.1.1      -> 1.1.1
     * [new tag]         1.1.10     -> 1.1.10
     * [new tag]         1.1.11     -> 1.1.11
     * [new tag]         1.1.12     -> 1.1.12
     * [new tag]         1.1.13     -> 1.1.13
     * [new tag]         1.1.2      -> 1.1.2
     * [new tag]         1.1.3      -> 1.1.3
     * [new tag]         1.1.4      -> 1.1.4
     * [new tag]         1.1.5      -> 1.1.5
     * [new tag]         1.1.6      -> 1.1.6
     * [new tag]         1.1.7      -> 1.1.7
     * [new tag]         1.1.8      -> 1.1.8
     * [new tag]         1.1.9      -> 1.1.9
     * [new tag]         1.2.0      -> 1.2.0
     * [new tag]         1.2.1      -> 1.2.1
     * [new tag]         1.2.2      -> 1.2.2
     * [new tag]         1.2.3      -> 1.2.3
     * [new tag]         1.2.4      -> 1.2.4
     * [new tag]         1.2.5      -> 1.2.5
     * [new tag]         1.2.6      -> 1.2.6
     * [new tag]         1.3.0      -> 1.3.0
     * [new tag]         1.3.1      -> 1.3.1
     * [new tag]         1.3.2      -> 1.3.2
     * [new tag]         1.3.3      -> 1.3.3
     * [new tag]         1.3.4      -> 1.3.4
     * [new tag]         1.3.5      -> 1.3.5
     * [new tag]         1.3.6      -> 1.3.6
     * [new tag]         1.3.7      -> 1.3.7
     * [new tag]         1.3.8      -> 1.3.8
     * [new tag]         1.3.9      -> 1.3.9
    HEAD is now at 837ea74 Merge pull request #3543 from MikeMcQuaid/remove-env-unsets
    ==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
    ######################################################################## 100.0%
    ==> Pouring portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
    ==> Tapping homebrew/core
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
    remote: Counting objects: 4655, done.
    remote: Compressing objects: 100% (4433/4433), done.
    remote: Total 4655 (delta 36), reused 317 (delta 10), pack-reused 0
    Receiving objects: 100% (4655/4655), 3.83 MiB | 765.00 KiB/s, done.
    Resolving deltas: 100% (36/36), done.
    Tapped 4427 formulae (4,702 files, 12.0MB)
    ==> Cleaning up /Library/Caches/Homebrew...
    ==> Migrating /Library/Caches/Homebrew to /Users/yang/Library/Caches/Homebrew...
    ==> Deleting /Library/Caches/Homebrew...
    Already up-to-date.
    ==> Installation successful!
    
    ==> Homebrew has enabled anonymous aggregate user behaviour analytics.
    Read the analytics documentation (and how to opt-out) here:
      https://docs.brew.sh/Analytics.html
    
    ==> Next steps:
    - Run `brew help` to get started
    - Further documentation: 
        https://docs.brew.sh
    yang:~ yang$ 
    

    相关文章

      网友评论

          本文标题:HomeBrew 卸载和安装

          本文链接:https://www.haomeiwen.com/subject/lbyiixtx.html