That’s listed in the makedepends array of the PKGBUILD, like here.
You might want to look into the query options -d in combination with -t for pacman’s -Q, to list packages installed as dependencies, but “Restrict or filter output to print only packages neither required nor optionally required by any currently installed package.”
Bonus cleanup pro-tip: alias pacorphans='sudo pacman -Qtdq | sudo pacman -Rns -' as explained in the wiki, mentioning makedepends in particular.
That’s listed in the
makedepends
array of the PKGBUILD, like here. You might want to look into the query options-d
in combination with-t
for pacman’s-Q
, to list packages installed as dependencies, but “Restrict or filter output to print only packages neither required nor optionally required by any currently installed package.”Bonus cleanup pro-tip:
alias pacorphans='sudo pacman -Qtdq | sudo pacman -Rns -'
as explained in the wiki, mentioning makedepends in particular.