Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.