けっきょく、ls-Rというファイルを探して全部消したんです。
理由は、別のものをインストールしたときに、ls-Rを更新しなければ
古いものを読み込み続けるからという理由でした。
ところがそれをすると、
$ texdoc
/usr/local/texlive/2017/bin/x86_64-darwin/texdoc:7: module 'texdoc.main' not found:
no field package.preload['texdoc.main']
[kpse lua searcher] file not found: 'texdoc.main'
[kpse C searcher] file not found: 'texdoc.main'
no file '/usr/local/lib/lua/5.2/texdoc.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './texdoc.so'
と出てしまって、ファイルを見つけられなくなった。pathを通せばいいけど
めんどうなので、結局ホームディレクトリでmktexlsrをしました。
その結果
find /usr/ -name "ls-R"

/usr//local/texlive/texmf-local/ls-R
/usr//local/texlive/2017/texmf-var/ls-R
/usr//local/texlive/2017/texmf-dist/ls-R
/usr//local/texlive/2017/texmf-config/ls-R
となりました。 結局消す前と同じものが作られたというわけです。