On this page: best practice - common cases - system mode vs. user mode - switching back to system mode.
This page is about usage and best practices for the updmap and fmtutil scripts in TeX Live. updmap manages font map files (used by pdftex, dvips, dvipdfmx, pxdvi) in TeX Live, and fmtutil manages formats for TeX Live.
These scripts work in one of two modes: user or sys(tem) mode. If no mode is specified, a warning is printed. (This is as of TeX Live 2017, when the -user variants were created; before that, the script name without a suffix was the user variant.)
Before going into details about the differences, some best practices follow.
The best recommendation is the simplest: just use system mode (updmap-sys, fmtutil-sys)!
Running a program a single time in user mode switches permanently: the result is that future updates to the system will be invisible, hidden by the user files. So, think twice and understand what you're doing before running anything in user mode.
Following are some common cases and how to handle them.
Probably the most common case. Here is the recommendation:
Advantages: Upgrades to new TeX Live releases in future years will pick up the fonts automatically. No future manual intervention is needed.
A common need in a department or company with organization-specific fonts, which all users should have access to:
Follow use case 1. That is all!
This is the only case where user mode is required, and thus TEXMFHOME is used instead of TEXMFLOCAL:
Important: after this, changes in the font setup of the system installation will not be seen until updmap-user is run again. Thus, you should run updmap-user whenever you think there might be changes in the set of installed fonts. There is no harm in running it extra times, when it might not be needed, so it would be good to run it regularly from, e.g., cron.
Creating new formats is a rare situation, but if it comes up, it can be handled analogously to case 1 above. That is, a new format is most probably intended for public use, so adding an entry to the file TEXMFLOCAL/web2c/fmtutil.cnf (creating it if necessary), then running fmtutil-sys suffices. Of course the TeX sources or other files needed by the format should also be installed in TEXMFLOCAL.
System and user mode have two main operational differences:
When a program is invoked in user mode, files are generated in TEXMFVAR (under the user's home directory). Since files in TEXMFVAR override the files in TEXMFSYSVAR (a system directory), they will take precedence over files in TEXMFSYSVAR forever after. Which in turn means that subsequent updates in the system-wide installation will not be visible to the user.
This has always been the primary confusion with fmtutil and updmap. It can be avoided by always using system mode, as recommended above. You can also go back to system mode fairly easily:
If you accidentally or intentionally run a script in user mode, you may then later realize you want to go back to system mode (good decision).
Switching back to system mode involves removing files in TEXMFVAR, which by default is ~/.texliveYYYY/texmf-var, where YYYY is the TeX Live release. (Of course it's prudent, and recommended, to move files to an area outside of any TeX directory, rather than literally removing them.)
In either case, those directories should contain only files which are automatically generated: but do yourself a favor, and check that no file you have yourself manually created is being removed.
We hope this page helps with this perennially painful topic. Please send suggestions and bug reports to the tex-live mailing list.