:: Remove make dependencies after install? [y/N] y
If I didn’t remove make dependencies, would yay/pacman be smart enough to know the thing I am installing does not actually depend on them? It’s a very nice feature of package managers that they track dependencies and can do things like remove “dangling” dependencies and I don’t want to mess that up with some random dependencies needed only for a build. But I also don’t want to install something every time I need to build lol.
So does yay and/or pacman know that the things I am installing don’t actually depend on the make dependencies?
Solution: Keeping the make dependencies after install will not fool pacman and/or yay into thinking the make dependencies are “real” dependencies of whatever you’re building from AUR. They both correctly recognize them as orphans (unless of course something else actually depends on them). So feel free to not remove them during install without worrying about dependency graphs getting tarnished; you’ll be able to easily remove them later if you’d like.
I’m going to guess that the make dependencies are installed explicitly and not as a dependency. You can check the if they are explicitly installed or not with the output from
pacman -Qi packagename
iirc. If it doesn’t work then trypacman -Qii packagename
.So does yay and/or pacman know that the things I am installing don’t actually depend on the make dependencies?
I’m pretty sure make dependencies aren’t considered dependencies of the package you are installing.
Nice, this is insightful, how can I see what the make dependencies of the AUR package are? I can compare it with this output and know for sure.
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.Awesome! Thanks so much. This has been helpful. I reinstalled the package and chose to keep the build dependencies. When I run
pacman -Qii foo
(wherefoo
is the thing frommakedepends
) I can see that is is required by nothing. Also,pacman -Qtd
shows it as an orphan (as expected). This is perfect and exactly what I was trying to figure out. I can “safely” (not that there would’ve been danger) keep these dependencies without the package managers being fooled into thinking they’re actually needed to run the thing once installed.
I think it is the equivalent of running ‘make clean’ after a build from source? You can do this manually building arch user repo packages to free up space because the executable and package that you installed is already there through pacman. However, updates in the future would require building those make dependencies again so it might save you time in the future, but probably irrelevant to you running the app today.
I’m most worried about having packages installed that my package manager thinks I intentionally installed and won’t auto remove. I’m not super into having a “minimal” system, so I don’t care if they sit around “unneeded”, but I want to make sure they’re gonna get removed if I remove the thing they were needed to build. Does that make sense?
i’d say generally you’re right to keep them so that you don’t have to install them again on updates. depends on how heavy the dependencies are, how often you update, if you’re planning on removing the package soon, etc. it’s gonna be tough to make a recommendation without knowing your situation, but for me personally i’d be on the lookout for a binary distribution or other more efficient install options. barring other options i’d probably keep them as long as they aren’t overriding another system library.