If I’m installing from source, do I need to keep the extracted tarball directory? So if I download the git tarball. I then do:
tar -xvzf git.tar.gz
This will create a git.x.x. directory, into which I cd, then run ./configure etc. Once I’m done with this process, and git, or whatever is installed, do I need to keep the original git.x.x extracted directory, or is that just used for compiling the program?
I’m somewhat confused by all the directories, and folders used for programs.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You don’t need to keep it. However, you may want to keep the package tarball itself for:
make uninstall
Generally source packages have this as a make target so that you can tidily remove the package from your system if desired. It should not depend on preserving the state of the build, so you can erase the directory and then later unpack the tarball and just do it.
Things from a git repo may be less consistent. You can check to see if the target exists with make --dry-run uninstall1. If so, tar or otherwise archive the directory yourself and stash it.
If you know you can get the same package in the same version anytime, you don’t need to keep the tarball either. And of course, if you know what was installed and it is simple and straightforward (e.g. just an executable and a man page), this is not a big concern.
1. Implying a way to deduce what’s installed by make install 😉
Method 2
Installing basically means copying the files in the extracted tarball over onto your filesystem. So no, you don’t need to keep the original once the contents are copied.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0