Question regarding removing source files after building

In most cases (source files are not consistent), you can remove the source files, tarball etc if you want. This however may make it difficult to remove the software depending on how you installed it, and the software itself.

If you used checkinstall, or don't think you want to remove the packages later, you can delete the source tarball(s) and free up space easily. If not, see below.

Tarball installers generally work by building anything they need to build, and then copying/moving the files to where they need to be. Some also are helpful by deleting temporary build files after compiling, and/or make a list of what was installed (which often is needed to uninstall, and is why you might not want to delete those files). Anyway some installers may have a uninstall option - e.g. to reverse sudo make install:

sudo make uninstall

This varies by installers, you can see if it supports by reading the documentation of the software (this should be included with the package), or by examining the uninstall file. So if you need to use the uninstall option, you may want to keep the source files. They should not be necessary to run most programs normally.

N.B. You probably can also remove some of the dependencies (the devel packages etc) as those may have only been needed for compiling the software, you don't need them to run it. To free up space generally you can also use the autoremove option with the apt-get command to remove unneeded dependcies.