MacTeX is a fully featured TeX distribution for Mac, incorporating various GUI applications, Ghostscript and the current version of TeX Live. Versions are released on an annual basis.

The GUI applications use the Sparkle update mechanism, and in some cases, this can be managed via Configuration Profile. However, the core TeX distribution included in the package is provided by TeX Live, which uses its own update utility. Fortunately, this incorporates a CLI that can be leveraged to script and automate this process.

tlmgr can be used to manage an existing TeX Live installation. It supports many (many) options, and I recommend reviewing the documentation if you're interested in this. However, in order to simply keep the bundled packages and configuration files up to date, this command is sufficient:

/Library/TeX/texbin/tlmgr update --self --all --no-require-verification

Options for running this include:

  • As a Munki postinstall_script
  • As a boot or login job via Outset
  • As a boot, login or scheduled job via launchd

An example of running this via launchd is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>KeepAlive</key>
	<false/>
	<key>Label</key>
	<string>your.org.texliveupdater</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Library/TeX/texbin/tlmgr</string>
		<string>update</string>
		<string>--self</string>
		<string>--all</string>
		<string>--no-require-verification</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist>

This will effectively run the job on boot. You could alternatively use StartInterval or StartCalendarInterval to more closely control the schedule of this job. This .plist, and a script to build a package from it, is available on GitHub here.