Ubuntu – Removing sources after building from them

buildcompilingdeletedirectorysource

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?

Best Answer

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.