[Tex/LaTex] How to update the TeX distribution

distributionsupdating

I'm trying to compile a document that only works with an up-to-date distribution, so I'd like to know: how do I update my distribution? Please provide screenshots where appropriate.

List of answers

To keep an eye on what’s going on at CTAN you may subscribe to the ctan-ann list or the RSS feed feed://www.mail-archive.com/ctan-ann@dante.de/maillist.xml

Best Answer

TeX Live from the Terminal/Command Prompt (Windows/Mac/Linux)

Understanding the TeX Live update scheme

If you have a TeXLive distribution (including MacTeX) there are a few things to understand about updating your system.

All TeX distributions consist of both binaries (including scripts) and packages (including classes). It is important to understand that for TeX Live these two parts of the distribution are effectively on separate update schedules, and this can lead to some confusion during the period in which the major updates of binaries is taking place.

The TeX Live binary part of the distribution undergoes a major update only once a year, while the packages can be updated constantly. This system, however comes at a cost: once a new binary version of TeX Live is available, package updates for the previous years are no longer available.

This means that if you have e.g. TeXLive 2011, you can update its packages roughly until TeXLive 2012 is created. After that point, your 2011 system will not be able to update any packages ever again using the normal package manager. (You can update individual packages manually via CTAN, of course.)

Major Updates

The major binary updates of TeX Live (which come out yearly) must be installed as if you were installing a fresh distribution. Since each version is installed in a folder named by its year, it's possible to have multiple distributions on the same system.

Package Updates

Once you have a version of TeX Live installed, you can update the packages as often as you like using the package manager tlmgr. The simplest command is:

tlmgr update --all

which will update all packages that have changed since the last update.

If you want to see a list of the updatable packages without updating them, you can use

tlmgr update --list

Sometimes it's necessary to update the package manager itself, in which case you need to use

tlmgr update --self

It is also possible to combine options together

tlmgr update --self --all --reinstall-forcibly-removed

with the final option (--reinstall-forcibly-removed) used as occasionally a package will become corrupted in one update and will therefore need to be reinstalled.

The Mac has a very nice GUI to the package manager called TeX Live Utility. See the MacOS answer for more details on that.

When is TeX Live "frozen"?

Once a year, the TeX Live packagers must "freeze" the system so that the latest version of the distribution (with new binaries) can be produced and tested. This means that there is a period during which tlmgr will no longer be able to update the current year's distribution even though the new year's distribution is not publicly available. This freezing is necessary so that the new distribution can be guaranteed to work. Once the current year is frozen, it will never be able to be further updated. To keep up-to-date, you will need to install the next year's distribution when it becomes available. For additional information, see Why does TeX Live "require" yearly updates?

Administrator/root privileges

If you install TeX Live as Administrator/root, then you will also need to update with these privileges. On Windows, an Administrator-privilege Command Prompt is run by finding the Command Prompt icon in the Start Menu, right clicking to obtain the options and choosing 'Run as Administrator ...'. For Mac users, using sudo will be sufficient as tlmgr will be available on the path. This may not be the case in Linux distributions: see below.

Some notes on Linux "TeX Live" based packages

  1. If you installed your TeX Live system using a Linux package manager (for example, apt-get), then there is no guarantee that it will be updated on the same schedule as the regular TeX Live. In most cases the updates lag by some time, often years, depending on the particular version of Linux you are running. For this reason, most experienced TeX users who run Linux install the vanilla TeX Live distribution directly, bypassing their OS package manager completely. See How to install "vanilla" TeXLive on Debian or Ubuntu? for more information on this.

  2. If you followed the directions in How to install "vanilla" TeXLive on Debian or Ubuntu? and installed TeX Live as root then you will also need to run tlmgr as root. You can do so (for example) by running sudo -s from the command line, which will log you in as root. Alternatively, you can run tlmgr with the full path, for example on a 64-bit installation

    sudo /usr/local/texlive/2011/bin/x86_64-linux/tlmgr
    

    Another option is to change the ownership of the TeX Live directory, by using (something like)

    sudo chown -R yourusername /usr/local/texlive/2011
    

    after which you can run tlmgr as a normal user (without sudo).

  3. When moving to a new version of TeXLive (e.g from 2011 to 2012) you may choose to remove the current installation you can use

    tlmgr uninstall
    

    (with sudo if you haven't changed the permissions) and see the steps described in How to remove everything related to TeX Live for fresh install on Ubuntu? for example.

Related Question