# How do I find which package installed another package?



## mrjayviper (May 21, 2022)

might be best explained using an example.

bash (/usr/local/bin/bash) got installed on my system. I know /usr/local/bin/bash was installed by the bash package. What I want to really know is what installed the bash package?

Thank you.


----------



## getopt (May 21, 2022)

pkg-which(8)


----------



## mrjayviper (May 21, 2022)

getopt said:


> pkg-which(8)


see my edit (since I wasn't clear with my original question. thank you


----------



## grahamperrin@ (May 21, 2022)

Cross-reference, with answers: How do I find out which package installed another package? : freebsd


----------



## getopt (May 21, 2022)

`pkg query %ro bash`


----------



## SirDice (May 23, 2022)

mrjayviper said:


> What I want to really know is what installed the bash package?


`pkg info -r bash`


```
-r, --required-by
             Display the list of packages which require pkg-name.
```
pkg-info(8)


----------

