Why the main installation directory (the one you choose under TeXLive
installation) is not a variable under kpsewhich?
It's $TEXMFROOT. But that is not sufficient for your task, because you
probably don't want things in $TEXMFLOCAL, $TEXMFVAR, $TEXMFCONFIG,
possibly $TEXMFHOME, ..., and those are not under $TEXMFROOT. -k