各位大佬, Homebrew 有没有类似于 pipdeptree 这样的工具列出所有的安装的工具的依赖树,方便清理无用的应用

2022-04-19 19:59:21 +08:00
 ChrisFreeMan

类似这样

{19:57}~ ➭ pipdeptree 
flake8==4.0.1
  - mccabe [required: >=0.6.0,<0.7.0, installed: 0.6.1]
  - pycodestyle [required: >=2.8.0,<2.9.0, installed: 2.8.0]
  - pyflakes [required: >=2.4.0,<2.5.0, installed: 2.4.0]
mypy==0.931
  - mypy-extensions [required: >=0.4.3, installed: 0.4.3]
  - tomli [required: >=1.1.0, installed: 2.0.0]
  - typing-extensions [required: >=3.10, installed: 4.0.1]
Pillow==9.0.1
pip-autoremove==0.10.0
  - pip [required: Any, installed: 22.0.3]
  - setuptools [required: Any, installed: 58.1.0]
pipdeptree==2.2.1
  - pip [required: >=6.0.0, installed: 22.0.3]
pygame-gui==0.6.4
  - pygame [required: >=2.0.1, installed: 2.1.2]
  - python-i18n [required: >=0.3.9, installed: 0.3.9]
pyinstaller==4.8
  - altgraph [required: Any, installed: 0.17.2]
  - macholib [required: >=1.8, installed: 1.15.2]
    - altgraph [required: >=0.15, installed: 0.17.2]
  - pyinstaller-hooks-contrib [required: >=2020.6, installed: 2021.5]
  - setuptools [required: Any, installed: 58.1.0]
rumps==0.3.0
  - pyobjc-framework-Cocoa [required: Any, installed: 8.1]
    - pyobjc-core [required: >=8.1, installed: 8.1]
toga==0.3.0.dev32
  - toga-cocoa [required: ==0.3.0.dev32, installed: 0.3.0.dev32]
    - rubicon-objc [required: >=0.3.0, installed: 0.4.2]
    - toga-core [required: ==0.3.0.dev32, installed: 0.3.0.dev32]
      - travertino [required: >=0.1.3, installed: 0.1.3]
1326 次点击
所在节点    程序员
8 条回复
ruanimal
2022-04-19 21:20:04 +08:00
关注。。
twing37
2022-04-19 21:26:45 +08:00
ngn999
2022-04-19 21:26:51 +08:00
brew ls 可以列出顶层的包, 不想要的, 你直接 uninstall, 然后`brew autoremove`能把用不到的依赖给清理掉.
lovedoing
2022-04-19 21:30:15 +08:00
rmtree
ChrisFreeMan
2022-04-19 21:46:59 +08:00
@twing37
@ngn999
@lovedoing
感谢,我明天试下
tbxark
2022-04-19 22:02:00 +08:00
brew deps --tree --installed
ChrisFreeMan
2022-04-20 11:12:46 +08:00
@tbxark 谢谢兄弟,正是我要的
Mutoo
2022-04-20 16:43:48 +08:00
之前用过一个可视化的,更直观一点
https://github.com/martido/homebrew-graph

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/847977

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX