Which package installed a dependency?

Since I didn’t explicitly install a package in my conda environment, I assume that the package is a dependency. How can I find what depends on it? Thanks.

You can use conda-tree to get the dependency tree: GitHub - conda-incubator/conda-tree: conda dependency tree helper


Mamba has a repoquery command, which includes a whoneeds subcommand. For example,

$ mamba repoquery whoneeds --tree libmamba
# Executing the query libmamba
# libmamba[1.5.1]
#   └─ libmambapy[1.5.1]
#      ├─ conda-libmamba-solver[23.9.3]
#      └─ mamba[1.5.1]
1 Like

Thanks @kenodegard. Can conda-tree figure out why conda list is under the mistaken impression that a package is still installed? Please see my reply.