← 返回命令列表

Linux command

brew-leaves 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List top-level packages (not dependencies)

brew leaves

List only manually installed leaves

brew leaves -r

List only dependency-installed leaves

brew leaves -p

Show dependency tree of leaves

brew deps --tree $(brew leaves)

说明

brew leaves lists installed formulae that are not dependencies of any other installed formula or cask. These are your "top-level" packages that you explicitly installed. This command shows the leaves of Homebrew's dependency graph - packages that can be safely uninstalled without breaking other packages.

参数

-r, --installed-on-request
Only list leaves that were manually installed by the user
-p, --installed-as-dependency
Only list leaves that were installed as dependencies of another formula

FAQ

What is the brew-leaves command used for?

brew leaves lists installed formulae that are not dependencies of any other installed formula or cask. These are your "top-level" packages that you explicitly installed. This command shows the leaves of Homebrew's dependency graph - packages that can be safely uninstalled without breaking other packages.

How do I run a basic brew-leaves example?

Run `brew leaves` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r, --installed-on-request do in brew-leaves?

Only list leaves that were manually installed by the user