1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrew でインストールしている全パッケージの依存関係を出力する

Posted at

Homebrew で管理するツールを最小限にしたいと思い、依存関係を洗い出そうとしたら意外と簡単にできたのでメモしておく。

$ brew list | xargs -I{} brew deps --tree {} | tee deps.txt

インストールしている formula が多いとけっこう時間がかかる。

こんな感じで出力されるので、どの formula が依存関係が多いのかがひと目でわかる。

deps.txt
arp-scan
└── libpcap

awscli
├── gdbm
├── openssl@1.1
├── readline
├── sqlite
│   └── readline
├── xz
└── python@3.8
    ├── gdbm
    ├── openssl@1.1
    ├── readline
    ├── sqlite
    │   └── readline
    └── xz

cairo
├── libpng
├── freetype
│   └── libpng
├── fontconfig
│   ├── libpng
│   └── freetype
│       └── libpng
├── gettext
├── libffi
:

自分の環境では、

  • fontforge がはちゃめちゃに依存が多いことがわかった、消したい
  • awscli を Docker で動かすようにして Python 依存を断とうかと思っていたが、思いのほか様々な formula から Python が使われておりどうやら無理そうということがわかった
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?