So, you obviously build software from source and then you're wondering it takes some extra space? (no, 16GiB isn't a lot nowadays...)
As already pointed out, for building software, you need the upstream sources (stored in
/usr/ports/distfiles) and the work directories to actually carry out the build (these are cleaned with
make clean
in the ports' directory). And, if you build directly on the machine, you will end up having packages installed that were
only needed to build other packages (build-dependencies). I'd assume
pkg autoremove
should remove them, never tried because I only ever build with poudriere to create a binary repository.
All in all, if you want to compare installed sizes, it makes no sense using one system with binary packages only and the other with software built locally on the machine. Just use pkg with official package repositories only to do that comparison (and don't install
/usr/ports and
/usr/src).
Chances are Debian with the same set of software installed will still be
somewhat smaller, that's because they're doing things FreeBSD normally doesn't do: Extensively modify upstream software and split it into multiple packages. This saves some space of course if you only need part of the whole upstream package. But FreeBSD normally tries to deliver software as close to upstream as possible.
edit:
I did that and I saw the output of a critter going into each directory individually. Considering the humongous size of the /usr/ports directory, I figured it would take a few weeks to finish so I killed it. The 'rm' method seems a lot faster.
It's also wrong. Although
work is the default name for the workdir, it can be overridden. It's unlikely many ports would do that, but there's a slight chance to miss something when just removing everything named "work".
Building in-tree is supported but cumbersome, I'd more or less call it a historic thing. If you do so, always do
make clean
instantly to avoid cluttering up your ports tree. For serious building of ports (IF you really need that because you want custom build options), have a look at poudriere.