:: 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.

  • JackbyDev@programming.devOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    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.

    • Gyroplast@pawb.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      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.