4

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.

2 Answers 2

7

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 ;)

4

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .