Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Suppose, we've built some package from sources (configure make install).
May we remove sources directory after successful building? Or it depends? On what, then?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

You don't need anything except the binaries. Those should already be copied to another location by make install. The rest can be removed. If you're unsure make a backup before removal. Remove, test if still working, if still working remove the backup.

Note: As ændrük pointed out: Using checkinstall Install checkinstall over make install has the virtue of enabling Ubuntu to track the installation. Later you can revert any changes made using the regular Ubuntu package management.

share|improve this answer
add comment

If you installed files using make install, the only way to know where they went later on if you want to uninstall them is to inspect the source files. You may want to archive a copy of the source for this purpose.

A better alternative is to use checkinstall instead of make install. This allows Ubuntu's package manager to track each of the installed files in the same way it tracks software from the repositories. When using this method of installation, you don't have to keep any extra files around.

share|improve this answer
    
+1 for checkinstall. Integrated in into my accepted answer so that any who stumbles across will see it. –  con-f-use Jun 9 '11 at 17:22
add comment

Generally once you got your binaries installed you can remove the directory containing source code, unless you want to compile them again, possibly with other compilation options.

Sometimes you could find particularly useful to keep the source directory, for example when upgrading Apache.

You can decide what's your best, in my opinion keep the source directory is a good thing. Obviously if you don't have disk space issues.

share|improve this answer
add comment

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.