LinuxCommandLibrary

tlmgr-update

Update TeX Live packages

TLDR

Update all TeX Live packages

$ sudo tlmgr update --all
copy

Update tlmgr itself
$ sudo tlmgr update --self
copy

Update a specific package
$ sudo tlmgr update [package]
copy

Update all except a specific package
$ sudo tlmgr update --all --exclude [package]
copy

Update all packages, making a backup of the current packages
$ sudo tlmgr update --all --backup
copy

Update a specific package without updating its dependencies
$ sudo tlmgr update --no-depends [package]
copy

Simulate updating all packages without making any changes
$ sudo tlmgr update --all --dry-run
copy

SYNOPSIS

tlmgr [TL_OPTIONS] update [UPDATE_OPTIONS] [PACKAGE...]

PARAMETERS

--all
    Updates all installed packages, including the TeX Live core system and tlmgr itself. This is the most common and recommended update mode.

--self
    Updates only the tlmgr program itself to the latest version available in the repository. This is often the first step recommended if you encounter issues with tlmgr.

--dry-run
    Performs a 'dry run' of the update process. It shows which packages would be updated without actually downloading or installing anything. Useful for previewing changes.

--force
    Forces an update or installation, even if TeX Live thinks it's not necessary or if a package is already installed. Use with caution.

--clean
    After a successful update, removes old package backups created during previous updates. This can save disk space. Can also be run separately as tlmgr clean --all.

--no-auto-backup
    Disables the automatic backup of old packages during an update. By default, tlmgr keeps a backup of the previous version of updated packages, allowing for rollback. Use this option to save disk space if backups are not desired.

--no-auto-install
    When updating packages, if a new dependency is required, tlmgr normally installs it automatically. This option prevents such automatic installations.

--repository URL
    Specifies an alternative CTAN repository mirror to use for the update. This can be a local path or a remote URL (e.g., http://mirror.ctan.org/systems/texlive/tlnet). Overrides the default configured repository.

--list
    Lists all available updates without performing any actions. Similar to --dry-run but typically shows a more concise list of what's available.

PACKAGE...
    Specifies one or more individual package names to update. If no packages are specified and --all is not used, tlmgr update behaves like --list.

DESCRIPTION

The tlmgr update command is the primary method for keeping a TeX Live installation current. It is a subcommand of tlmgr, the TeX Live Manager, which handles the installation, removal, and management of TeX Live packages.

When executed, tlmgr update connects to the configured TeX Live repository (typically an online CTAN mirror) to check for newer versions of installed packages, the TeX Live core system, and even the tlmgr program itself. It can update everything at once, just the manager, or specific packages.

The update process involves:
1. Synchronizing local package lists with the repository.
2. Identifying packages that have newer versions available.
3. Downloading the updated files.
4. Installing the new versions, often creating backups of the old files.

Regular use of tlmgr update --all is recommended to ensure you have the latest bug fixes, new features, and compatibility with recent LaTeX documents.

CAVEATS

Updating TeX Live can be resource-intensive, requiring a stable internet connection and potentially significant disk space for downloads and backups. Large updates can take a considerable amount of time. It's often recommended to run tlmgr commands that modify the system (like update) with administrator privileges (e.g., using sudo on Linux/macOS or as an administrator on Windows) if TeX Live was installed system-wide. Always ensure a reliable power source, especially on laptops, during critical updates.

DEFAULT REPOSITORY CONFIGURATION

By default, tlmgr uses the repository configured during the initial TeX Live installation, which usually points to a nearby CTAN mirror. This configuration is stored in files within your TeX Live installation (e.g., in texmf-dist/web2c/tlmgr.conf or an environment variable). You can view the current repository with tlmgr conf repository or change it permanently with tlmgr option repository URL.

AUTOMATIC BACKUPS AND ROLLBACK

Unless --no-auto-backup is used, tlmgr update automatically creates backups of old package versions before installing new ones. These backups are stored in a designated backup directory (e.g., /usr/local/texlive/YYYY/tlpkg/backup). This allows you to revert to a previous package version if an update causes issues using the tlmgr restore command.

HISTORY

The TeX Live Manager, tlmgr, was introduced with TeX Live 2008, replacing earlier, more rudimentary update scripts (such as install-tl-update). Its development marked a significant improvement in the ease of managing and maintaining TeX Live installations, providing a unified command-line interface for package management, updates, and configuration. The update subcommand has been a core part of tlmgr since its inception, continually evolving with new options and robustness improvements alongside TeX Live's annual releases.

SEE ALSO

tlmgr(1), texdoc(1), kpsewhich(1)

Copied to clipboard