# How do I update my TeX distribution?

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.

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

• What about Windows 10? – principal-ideal-domain Jan 22 '16 at 18:48
• @principal-ideal-domain Indeed, I now dropped the Windows versions everywhere. – ComFreek Sep 5 '19 at 9:09
• – KaiserKatze Mar 14 at 14:26

## 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.)

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.

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?

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.

• When one install TeX Live from the DVD, the default package repository is D: or the unit that corresponds to the DVD. I think is worth to mention how to change the default package repository to an online repository in order to perform the updates. – leo May 12 '12 at 23:21
• @leo This is a community wiki answer, so feel free to add some explanation of this if you like. I use a Mac, so I've never installed TeX Live using its own installer, and never from the DVD, so I certainly can't add this info myself. Although I'm not quite sure where this would fit into the answer. (I also suspect that most people don't install from DVD.) – Alan Munn May 12 '12 at 23:57
• The command line: tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet tells tlmgr to use a nearby CTAN mirror for future updates. If there are problems with the automatic mirror selection, you can specify a particular CTAN mirror from the list – leo May 13 '12 at 14:43
• Another idea for install is to manually install TeXLive to a separate path (i.e. /usr/local/texlive), create a group texlive, add yourself to it, and then change the install dir's group to texlive with permissions 775. This way you can install and update TeXLive without sudo, but the directory is still protected from modifications by users not in the texlive group. – Robbie May 19 '12 at 8:17
• Regarding Major Updates it should be noted that for TeX Live 2011 it was possible (and documented) for an experienced user to upgrade from TL2010 with a few commands. I hope this will again be possible for TL2012. A fresh installation is... refreshing, but it is also welcome to be able to transfer the selection of packages to the new version. – nplatis Jun 7 '12 at 5:20

## MacTeX (Mac)

With MacTeX on Mac OS X you’ll have the TeX Live Utility installed. If you start this app it will connect with CTAN and list up the possible updates.

In the list you can see if a package is updated, removed from TeX Live (gray) or new/uninstalled (blue). Now make sure that you are not using one of the packages that will be deleted. If you are using one of them save its files to your local texmf tree. You may also check what's changed in the updated packages, after installing them. Now you can update all packages with cmd + shift + U, or only the selected packages with cmd + U.

With cmd + I you can see some information about a package and get a list of documentation files.

• And I had this tool for all this time... Thanks! – Zenon May 11 '12 at 22:44
• If you install MacTeX without the GUI tools (i.e. just the basic TeX Live part), see the generic TeX Live answer. – Joseph Wright May 12 '12 at 7:47
• by the way, a nice way to keep up to date is to use homebrew + cask : github.com/meduz/dotfiles/blob/master/init/… – meduz May 28 '14 at 7:25
• @meduz Well, you wouldn't get upstream's TL in that case, would you? – cfr Dec 14 '14 at 1:31
• Mac Tex should have installed TeX Live Utility however if you want a recent copy here is link to homepage amaxwell.github.io/tlutility – user170109 Apr 14 '19 at 18:39

## MiKTeX GUI (Windows/macOS/Linux)

Note on macOS and Linux: This answer is written with Windows in mind, but MikTeX offers the same graphical user interfaces on the other operating systems, too! Consult the MikTeX docs to get to know how to open them.

MiKTex can be updated with 2 methods. With method 1 only updates are possible – it's intended for this task –, method 2 uses the package manager, originally intended for manual package installations and uninstallations.

Unlike in TeXlive also binary files are updated if necessary. They are provided as additional packages with names starting with miktex-<name>-bin (and supporting packages with similar names).

If you installed MiKTeX with Administrator privileges (as a multi-user installation), you will have '(Admin)' versions of the commands described here. To fully update your system, run the update both with and without the '(Admin)' mode enabled. This is necessary as with auto-install enabled, MiKTeX will have managed files both in the system-wide (Admin) area and your own user tree.

# MikTeX Console

Newer versions of MikTeX have one tool to do all maintenance tasks. The *MikTeX Console*. You can find it in

start>All Programs>MiKTeX 2.9>MikTeX Console

You will be greeted with the following screen

If you installed MiKTeX with Administrator privileges, you will have to go through the following steps once in user mode and once in Admin mode.

Choose one of the two options. If you choose your mode the console may restart and you will be met with

Go to Updates in the sidebar to the left.

Press on Check for updates and wait for MikTeX to fetch the update information from the package database (this may take a while, hang in there).

If updates are available they will be listed below and you can install them by clicking on Update now. You can deselect certain packages. Note that if important system updates are available, not all packages may be checked for updates initially. Do not select more packages, in that case, run the updater with only the checked packages first and then re-run it afterwards. On the second run, all other packages should be selected and will be updated.

The windows is greyed-out while the packages update. It shows a short progress report.

## Older MikTeX versions: MikTeX Update and Package Manager

### Method 1

The update utility can be started from

start>All Programs>MiKTeX 2.9>Maintenance>Update.

You can also search for "Console" or "MikTeX Console" in the search bar. Most MikTeX links in the start menu will lead to the console directly. If you have a link "MikTeX Update", it will direct you to the update page of the MikTeX Console.

This will open up a window like this:

Here, one can choose the package repositories and adjust connection settings. Pressing Next button will take you to the next window which will show, after a search through the repository for update-able packages (if any).

Here we can select the packages we want to update and click Next again:

Usually, all packages are already selected. But sometimes, if an important internal MiKTeX binary has to be updated, this is selected alone and the update should separately be executed, first. Afterwards, a second call of the update utility will select all other update-able packages.

### Method 2:

Alternatively, one can open the MiKTeX package manager by

start>All Programs>MiKTeX 2.9>Maintenance>Package Manager.

When opened, it looks like this:

From here, one can choose the repository tab to change the repository and synchronize the packages with the repository. After synchronizing, through Edit tab, we can perform Select All or Select Installable Packages or Select Updateable Packages. When this is done, the + or - buttons under the File menu get activated. By clicking + we can install updateable packages, while - button will remove the packages (Attention!).

• – matth May 14 '12 at 11:38
• Dear @matth: This question is expecting the detailed answers for how to update and not about the best practices. I don't feel that they are related. – user11232 May 14 '12 at 11:49
• Dear @HarishKumar: You give a note about the admin mode. In the question I linked this aspect is discussed further (or how to avoid the situation of having two trees). If you insist these are unrelated I do not mind to remove my comments. – matth May 14 '12 at 12:51
• @matth: Never mind. If you feel that it will be useful for somebody, let it be there. No problem at all. – user11232 May 14 '12 at 13:28
• The related post was useful for me, I wasn't aware of the potential Admin/User issues with conflicting packages. – Rabarberski Oct 29 '12 at 8:56

## TeX Live GUI (Windows)

TeX Live on Windows includes a graphical user interface for managing installed packages. The first stage of using this, after starting it from the Start Menu, is to load the package list from the internet.

Once this is done, you can simply press the Update button to run the process.

Notice that I've chosen to reinstall any removed packages: this is a useful precaution against the occasion issue with a removed package.

If you installed TeX Live with Administrator privileges, remember to run the TeX Live Manager with the same privileges.

## MiKTeX from the Command line (Windows/macOS/Linux)

The command line tool for MiKTeX package manager is called mpm. It can be used as:

mpm [option...]


The MiKTeX website has this description for the tool mpm.

MPM (MiKTeX Package Manager) is used to install packages from a MiKTeX package repository.

MPM was originally intended to be a tool for MiKTeX users. But the program can be helpful for users of other TeX systems too, because many of the MiKTeX packages are system-independent. Two variants

The package manager can be run in two modes:

batch

--MPM is driven by command-line options.

windowed

--MPM shows a package list view with standard GUI controls (such as tool bar buttons and command menus).

MPM starts in windowed mode, if you do not specify any command-line options.

In 'windowed mode' the tool starts the GUI interface.

Following are the command line options respected by mpm.

--admin


--find-updates


Test the package repository for updates, then print the list of updateable packages.

--help


Give help and exit.

--hhelp


This option is only available on Windows systems: show the manual page in an HTML Help window and exit when the window is closed.

--import=PACKAGE


Import the specified package from another MiKTeX installation. The root directory must be specified via --repository=DIR.

--import-all


Import all packages from another MiKTeX installation. The root directory must be specified via --repository=DIR.

--install=package


Install the specified package.

--install-some=file


Install packages listed (line-by-line) in the specified file.

--list


List the contents of the package database: for each package, print the installation status, the number of files, the size, and the name.

--list-repositories


Download the list of known package repository URLs from the MiKTeX project server, then print the list.

--pick-repository-url


Pick up a suitable URL from the package repository list and print it.

--print-package-info=package


Print detailed information about the specified package.

--quiet


Suppress all output, except errors.

--repository=location


Use the specified location as the package repository. The location can be either a fully qualified path name (a local package repository) or an URL (a remote package repository). You can use the --list-repositories to retrieve a list of working package repository URLs.

--set-repository=location


This option is only available on Windows systems: permanently register the location of the default package repository in the user area of the Windows Registry. The location can be either a fully qualified path name (a local package repository) or an URL (a remote package repository).

--trace[=tracestreams]


Enable trace messages. The tracestreams argument, if speciefied, is a comma-separated list of trace stream names (Chapter 9, Trace Streams).

--uninstall=package


Uninstall the specified package.

--update=[package]


Update the specified package, if an updated version is available in the package repository. Update all installed packages, if package is omitted.

--update-db


Synchronize the local package database with the package repository.

--update-some=file


Update packages listed (line-by-line) in the specified file.

--verify


Verify the integrity of all installed packages.

--verify=package


Verify the integrity of the specified package.

--verbose


Turn on verbose output mode.

--version


Show version information and exit.

Installation Destination:

All files are installed in the TEXMF installation directory (usually C:\Program Files\MiKTeX 2.9). It may be necessary to specify the location of the installation directory, if you are running MPM as a standalone program, i.e., if MiKTeX is not the TeX system.

The --install-root option allows you to set the installation directory for one invocation of MPM.

Package Database:

All package information is retrieved from the package database, which must have been properly installed by running MPM with the --update-db option.

Examples

Print the list of known package repository URLs:

mpm --list-repositories


Retrieve the package database files from the FTP server some.server:

mpm --repository=ftp://some.server/miktex/packages/ \ --verbose --update-db


mpm --print-package-info a0poster


Install package a0poster:

mpm --verbose --install a0poster


Update all installed packages:

mpm --verbose --update


Print the list of installed packages:

mpm --list | grep ^i


Reference: MiKTeX page for mpm

## TeX Live OpenBSD

All packages TeXLive included are compiled against specific version of OpenBSD i.e. package upgrade is not possible without upgrading kernel and userland first. A typical desktop user (i386, amd64, loongson, sparc64, macppc, sgi) moving from 2010 TeXLive version which was shipped with OpenBSD 5.0 released November 1 of 2011 to TeXLive 2011 version which is shipped with OpenBSD 5.1 released May 1 of 2012 will preform the following steps:

1.. BEFORE UPGRADING: must delete an X directory:

rm -rf /usr/X11R6/share/X11/xkb/symbols/srvr_ctrl


2.. Boot from the install kernel by boot media or bsd.rd and follow the upgrade steps, which are very similar to the install process. A typical OpenBSD installation takes less than 10 minutes.

3.. Merging locally changed files via sysmerge. Assuming the etc51.tgz and xetc51.tgz files exists in your $RELEASEPATH, run it with: sysmerge -s$RELEASEPATH/etc51.tgz -x \$RELEASEPATH/xetc51.tgz


4.. A number of files should be deleted from your system:

rm /etc/rc.d/aucat
rm /etc/ccd.conf /sbin/ccdconfig /usr/share/man/man8/ccdconfig.8
rm /usr/sbin/pkg_merge
rm /usr/libexec/getNAME /usr/share/man/man8/getNAME.8
rm -rf /usr/lib/gcc-lib/i386-unknown-openbsd5.0
rm -f /usr/bin/midicat /usr/share/man/man1/midicat.1
rm -f /usr/bin/makewhatis /usr/bin/mandocdb /usr/share/man/man8/mandocdb.8


5.. Now to update all your packages not just TeXLive, make sure PKG_PATH is pointing to the 5.1 packages directory on your CD or nearest FTP mirror, and use something like

pkg_add -ui


That is it. You now have completely updated system with all packages updated not just TeXLive.

Warning:

The above is just an outline of the upgrading process for a typical desktop machine and may vary pending on your local modifications. It is not meant to be substitute for reading official documentation.

Caveats:

Upgrading is a convenient way to bring your OpenBSD system up to the most recent version. However, the results are not intended to precisely match the results of a wipe-and-reload installation. Old library files in particular are not removed in the upgrade process, as they may be required by older applications that may or may not be upgraded at this time. If you REALLY wish to get rid of all these old files, you are probably better off reinstalling from scratch. A typical OpenBSD installation with custom siteXX.tgz and install/upgrade.site files/scripts will take lass than 10 minutes plus another 10-15 minutes for installing all packages as long as they are stored somewhere locally.

Linux distributions ship tested and coordinated TeX installations as packages, usually texlive. They might be somewhat outdated (not too much on Fedora, at least). I'd suggest you use that, unless you have some pressing need for a brand new version of something (but then your document won't be buildable elsewhere). Standard open source guarantee applies if you install by yourself: If it breaks, you get to keep the pieces.

• I used the distributions from my Linux distribution for quite some time (about 3 years: I use LaTeX for 5 years now). The installation of vanilla TeXLive is almost as complicated (./install-tl vs. sudo apt install texlive-full) and I think it works much better than the one from the Linux repo. Which also offers the same guarantee... – Phelype Oleinik Feb 9 '20 at 16:56
• @PhelypeOleinik, in the distribution's case, somebody is responsible for the package, there are bug reporting systems (and bugs do get fixed, eventually), you can share your woes with other users online, ... – vonbrand Feb 11 '20 at 15:19
• Same is true for TeXLive: there are responsible someone(s), and a mail to tex-live at tug.org is answered in a couple of hours and bugs are fixed quite quickly. As I said, same guarantee... – Phelype Oleinik Feb 11 '20 at 19:54