# `mix deps.tree`
[🔗](https://github.com/elixir-lang/elixir/blob/v1.20.4/lib/mix/lib/mix/tasks/deps.tree.ex#L5)

Prints the dependency tree.

    $ mix deps.tree

If no dependency is given, it uses the tree defined in the `mix.exs` file.

## Command line options

  * `--only` - the environment to show dependencies for.

  * `--target` - the target to show dependencies for.

  * `--exclude` - exclude dependencies which you do not want to see printed. You can
    pass this flag multiple times to exclude multiple dependencies.

  * `--umbrella-only` *(since v1.17.0)* - only include the umbrella applications.
    This is useful when you have an umbrella project and want to see the
    relationship between the apps in the project.

  * `--format` - can be set to one of either:

    * `pretty` - uses Unicode code points for formatting the tree.
      This is the default except on Windows.

    * `plain` - does not use Unicode code points for formatting the tree.
      This is the default on Windows.

    * `dot` - produces a DOT graph description of the dependency tree
      in `deps_tree.dot` in the current directory. See the documentation
      for the `--output` option to learn how to control where the file
      is written and other related details.

  * `--output` *(since v1.20.0)* - can be used to override the location of
    the file created by the `dot` format. It can be set to

    * `-` - prints the output to standard output;

    * a path - writes the output graph to the given path

    If the output file already exists then it will be renamed in place
    to have a `.bak` suffix, possibly overwriting any existing `.bak` file.
    If this rename fails a fatal exception will be thrown.

## Examples

Print the dependency tree for the `:test` environment:

    $ mix deps.tree --only test

Exclude the `:ecto` and `:phoenix` dependencies:

    $ mix deps.tree --exclude ecto --exclude phoenix

Only print the tree for the `:bandit` and `:phoenix` dependencies:

    $ mix deps.tree --include bandit --include phoenix

---

*Consult [api-reference.md](api-reference.md) for complete listing*
