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?


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.

| improve this answer | |

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.

| 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

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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