One - One Code All

Blog Content

brew 查看安装的软件列表及卸载软件

Linux-Mac   2021-03-21 10:58:57

今天想查看brew 安装的软件列表,

执行:brew list 后出现

/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)


说明:Mac升级macOS Big Sur后 homebrew失效,

解决方法是:

brew update-reset


brew list 软件名 来显示路径

1、通过brew install安装应用最先是放在/usr/local/Cellar/目录下。

2、有些应用会自动创建软链接放在/usr/bin或者/usr/sbin,同时也会将整个文件夹放在/usr/local

3、可以使用 brew list 软件名 (比如 brew list docker)确定安装位置。

brew list docker


brew卸载软件:


使用brew uninstall git卸载软件只会卸载软件本身而不会同时卸载其依赖包,使用以下命令可完全卸载,并且不会影响到其他软件。

brew tap beeftornado/rmtree

这一步更新时间可能比较长,请耐心等待。

这一步报错:

fatal: unable to access 'https://github.com/beeftornado/homebrew-rmtree/': 
LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
Error: Failure while executing; `git clone  
 /usr/local/Homebrew/Library/Taps/beeftornado/homebrew-rmtree --origin=origin` exited with 128.

官网也有issue:  https://github.com/libressl-portable/portable/issues/369#

移除了我本机的http代理。然后问题消失.vim ~/.gitconfig, 把里面关于https的配置删掉,然后就可以了。

如果gitconfig里配置里不可用的账号,也要移除。


其实最好的方法是更换brew 的git 源,

git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git


结束后执行如下命令即可完全卸载软件。

brew rmtree docker
brew cleanup

结果如下:

GrantdeMacBook-Pro:homebrew-cask grantbai$ brew rmtree docker
==> Examining installed formulae required by docker...
 /

Can safely be removed
----------------------
docker

Proceed?[y/N]: y
==> Cleaning up packages safe to remove

Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker
Uninstalling /usr/local/Cellar/docker/19.03.7... (14 files, 74.7MB)
GrantdeMacBook-Pro:homebrew-cask grantbai$ brew cleanup
Warning: Skipping autojump: most recent version 22.5.3_2 not installed
Warning: Skipping boost: most recent version 1.75.0_2 not installed
Warning: Skipping capnp: most recent version 0.8.0 not installed
Warning: Skipping cmake: most recent version 3.19.7 not installed
Warning: Skipping erlang: most recent version 23.2.7 not installed
Warning: Skipping erlang@20: most recent version 20.3.8.26 not installed
Warning: Skipping fftw: most recent version 3.3.9 not installed
Warning: Skipping freetype: most recent version 2.10.4 not installed
Warning: Skipping gcc: most recent version 10.2.0_4 not installed
Warning: Skipping gd: most recent version 2.3.2 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/gd--2.2.5.catalina.bottle.tar.gz... (288.4KB)
Warning: Skipping gdb: most recent version 10.1_1 not installed
Warning: Skipping gdbm: most recent version 1.19 not installed
Warning: Skipping gearman: most recent version 1.1.19.1 not installed
Warning: Skipping geoip: most recent version 1.6.12 not installed
Warning: Skipping gettext: most recent version 0.21 not installed
Warning: Skipping git: most recent version 2.31.0 not installed
Warning: Skipping glib: most recent version 2.68.0 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/glib--2.64.1.catalina.bottle.tar.gz... (4.6MB)
Warning: Skipping glpk: most recent version 5.0 not installed
Warning: Skipping gmp: most recent version 6.2.1 not installed
Warning: Skipping go: most recent version 1.16.2 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/go--1.14.catalina.bottle.tar.gz... (153.0MB)
Warning: Skipping google-sparsehash: most recent version 2.0.4 not installed
Warning: Skipping graphicsmagick: most recent version 1.3.36 not installed
Warning: Skipping graphviz: most recent version 2.46.1 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/graphviz--2.42.3.catalina.bottle.tar.gz... (7.5MB)
Warning: Skipping gsl: most recent version 2.6 not installed
Warning: Skipping hdf5: most recent version 1.12.0_1 not installed
Warning: Skipping imagemagick: most recent version 7.0.11-3 not installed
Warning: Skipping isl: most recent version 0.23 not installed
Warning: Skipping jasper: most recent version 2.0.27 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/jasper--2.0.16_1.catalina.bottle.tar.gz... (690.5KB)
Warning: Skipping libevent: most recent version 2.1.12 not installed
Warning: Skipping libffi: most recent version 3.3_3 not installed
Warning: Skipping libidn2: most recent version 2.3.0 not installed
Warning: Skipping libmpc: most recent version 1.2.1 not installed
Warning: Skipping libressl: most recent version 3.2.5 not installed
Warning: Skipping libtiff: most recent version 4.2.0 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/libtiff--4.1.0.catalina.bottle.tar.gz... (1.1MB)
Warning: Skipping libtool: most recent version 2.4.6_2 not installed
Warning: Skipping libunistring: most recent version 0.9.10 not installed
Warning: Skipping llvm: most recent version 11.1.0 not installed
Warning: Skipping mercurial: most recent version 5.7.1 not installed
Warning: Skipping mpfr: most recent version 4.1.0 not installed
Warning: Skipping multimarkdown: most recent version 6.6.0 not installed
Warning: Skipping multitail: most recent version 6.5.0 not installed
Warning: Skipping netpbm: most recent version 10.86.19 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/netpbm--10.86.10.catalina.bottle.tar.gz... (1.6MB)
Warning: Skipping nginx: most recent version 1.19.8 not installed
Warning: Skipping ninja: most recent version 1.10.2 not installed
Warning: Skipping open-mpi: most recent version 4.1.0 not installed
Warning: Skipping openblas: most recent version 0.3.13 not installed
Warning: Skipping openssl@1.1: most recent version 1.1.1j not installed
Warning: Skipping pcre2: most recent version 10.36 not installed
Warning: Skipping pkg-config: most recent version 0.29.2_3 not installed
Warning: Skipping python@3.9: most recent version 3.9.2_2 not installed
Warning: Skipping rabbitmq: most recent version 3.8.14 not installed
Warning: Skipping readline: most recent version 8.1 not installed
Warning: Skipping redis: most recent version 6.2.1 not installed
Warning: Skipping rlwrap: most recent version 0.45 not installed
Warning: Skipping source-highlight: most recent version 3.1.9_4 not installed
Warning: Skipping sphinx-doc: most recent version 3.5.3 not installed
Warning: Skipping sqlite: most recent version 3.34.1 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/sqlite--3.31.1.catalina.bottle.tar.gz... (1.9MB)
Warning: Skipping suite-sparse: most recent version 5.9.0 not installed
Warning: Skipping tmux: most recent version 3.1c_1 not installed
Warning: Skipping watch: most recent version 3.3.17 not installed
Warning: Skipping webp: most recent version 1.2.0 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/webp--1.1.0.tar.gz... (3.8MB)
Warning: Skipping wget: most recent version 1.21.1 not installed
Warning: Skipping wxmac: most recent version 3.0.5.1_1 not installed
Warning: Skipping zsh-completions: most recent version 0.32.0 not installed
Removing: /Users/grantbai/Library/Caches/Homebrew/python--3.7.7.catalina.bottle.tar.gz... (14.9MB)
Removing: /Users/grantbai/Library/Logs/Homebrew/libtiff... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/python... (3 files, 148.3KB)
Removing: /Users/grantbai/Library/Logs/Homebrew/gts... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/glib... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/netpbm... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/webp... (6 files, 680.3KB)
Removing: /Users/grantbai/Library/Logs/Homebrew/sqlite... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/xz... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/graphviz... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/gd... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/pcre... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/jpeg... (64B)
Removing: /Users/grantbai/Library/Logs/Homebrew/jasper... (64B)
Pruned 2 symbolic links from /usr/local



上一篇:python内存检测管理所用到的库
下一篇:Mac 最近GitHub无法访问

The minute you think of giving up, think of the reason why you held on so long.