Best practices for managing software built from Github on personal machine

I know that when installing software, the first place to look is pacman. If it is not there you can check the AUR and you have the option of using yay to get the program or of cloning the git repo and building it yourself.

What about software you just found on Github? For example, I found a program with installation instructions for having you manually putting binaries in your /usr/bin and /usr/lib, then manually making config files.

Lets say I want to uninstall this later. Do I just manually keep track of what I added? It seems like this way would bypass the package manager’s ability to track dependencies. Is there some way to be using yay that I don’t know about? Does pacman have some feature to handle this?

Welcome to the forum! :slight_smile:

Software compiled by hand should never be put into /usr/bin and /usr/lib, but should instead be put under /usr/local/bin and /usr/local/lib. Normally the install script would provide for a way to uninstall the software again, but this is never to be taken for granted.

So yes, it is probably wisest to keep an admin journal in which you document what you’ve done, so that you can always manually undo it again. :man_shrugging:


Thanks Aragorn. Under the hood, if I were to execute my new program in bash, bash would check its configuration files for the places where bin and libs are stored? So by default one of those places would be /usr/bin and another would be /usr/local/bin?

If I later installed a program from pacman, would pacman recognize that I have a required dependency in usr/local/bin and not try to get it’s own copy that it manages? If so, then I would still run the risk of breaking other software if I went to uninstall it later.

/usr/local/bin is in the $PATH by default, yes. However, I’m not a programmer, and there’s a chance you’ll have to mess with ldconfig to get the libraries found. Therefore, be sure to read all of the documentation.

No, something compiled by hand and installed outside of the scope of pacman won’t register in the package database, and therefore pacman will have no knowledge of the package existing on your system.

1 Like

Great. So this would mean that anything I compile and install by hand I should be safe uninstalling by hand simply by removing the files that I added (and if config files were modified, to unmodify those files). This is drastically simpler than having to have an eagle eye during updates to see if they are trying to use any dependency I have self compiled.

1 Like

If you want to manage software on Github with pacman, you can make a PKGBUILD yourself. I know it takes some time to learn, but managing those software will be easier, when you want to update or remove them.

This is useful to know. I am new to compiling my own software, so I am still learning what is Arch-specific as opposed to files used by the build tools. Right now I am drinking from the firehose of information.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.