[Tex/LaTex] difference between texconfig rehash and mktexlsr

installingpackagestexlive

With reference to this answer;
Is there a difference between texconfig hash and mktexlsr?

For example: Is sudo texconfig rehash able to clean up ls-R
in cases where mktexlsr remains deficient? or;
Is this only due to the sudo in the former command?

Best Answer

Reading the man pages and running a few straightforward tests, I found out this:

  • texconfig rehash calls mktexlsr, yet a [directories] argument is not passed on.
  • mktexlsr accepts a [directories] argument.
  • texhash calls mktexlsr and passes on a [directories] argument. texhash as a command name is easier to remember than "make TeX ls-R", though.

A number of system folders are skipped because of being write-protected to normal users. So, it is better to use sudo texhash if you can, except when (re)hashing texhash ~/texmf.