# TeX Live Repository for Installation Using the TeX Live Package Manager tlmgr

Deutsch: → TeX Live Repository zur Installation über den TeX Live Paketmanager tlmgr

Since 2013 TeX Live has provided the facility to use several package repositories. Doing so, you can also state which package should be installed from which repository. There are two different methods:

The repository structure has been changed from TeX Live 2015 to TeX Live 2016. Therefore we have two different repositories:

Please note, access to these links is possible with `tlmgr` only.

#### One-time, not persistent installation

Installing a package from a particular repository once is easy. Just use `tlmgr` this way:

`tlmgr install --repository <URL> <package name>`

You have to replace `<URL>` by the URL of the repository and `<package name>` by the name of the TeX Live package to be installed. If the package has already been installed, you have to add option `--reinstall`. If you want to replace, e.g., `koma-script` of TeX Live 2019 by the package of my repository you can use:

`tlmgr install --reinstall --repository https://www.komascript.de/repository/texlive/2019 koma-script`

Note that with the next update the packages of my repository generally will be replaced by the packages from the main TeX Live repository. This is because the main TeX Live repository internally uses much larger revision numbers. Therefore the above way of installation of a package from my repository is only a temporary one. Nevertheless, you can also remove such packages using the graphical user interface of the TeX Live Package Manager that can be started using »`tlmgr gui`«. After removing the package you can reinstall it from the main TeX Live repository.

Please note, if you have a multi-user installation of TeX Live on Windows, you have to start `tlmgr` as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide package installation only for user root. In this case you can use `sudo` to execute `tlmgr`, e.g.:

`sudo tlmgr install --reinstall --repository https://www.komascript.de/repository/texlive/2019 koma-script`

Nevertheless, TeX Live provides a user mode for multi-user installations. In user mode every user can install private packages. See the user manual for more information. You get it using either »`texdoc tlmgr`« or »`tlmgr help`«. By the way: Sometimes, the user mode can also be used to update packages and install packages if you do not use Vanilla TeX Live but the TeX Live packages of a Linux distribution.

#### Pinning a repository for a package

You can define a repository to be the one always used for installation and updates of a package. To do so, you first have to add the repository to the known repositories. Then you can pin that repository for a package, e.g., the TeX Live package `koma-script`:

```tlmgr repository add https://www.komascript.de/repository/texlive/2019 KOMA
tlmgr pinning add KOMA koma-script```

Users of TeX Live 2013–2015 please replace the `2019` at the URL by `2015`.

After pinning the repository to the package you still have to install it. If the package has already been installed before, you have to force a re-installation:

`tlmgr install --reinstall koma-script`

While running this installation and all future updates of `koma-script`, `tlmgr` should show a line like:

`[1/1, ??:??/??:??] reinstall: koma-script @KOMA [6373k]`

in the output. The `@KOMA` shows you that the package is installed from the `KOMA` repository.

Please note, if you have a multi-user installation of TeX Live on Windows, you have to start `tlmgr` as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide package installation only for user root. In this case you can use `sudo` to execute `tlmgr`, e.g.:

```sudo tlmgr repository add https://www.komascript.de/repository/texlive/2019 KOMA
sudo tlmgr pinning add KOMA koma-script
sudo tlmgr install --reinstall koma-script```

Nevertheless, TeX Live provides a user mode for multi-user installations. In user mode every user can install private packages. See the user manual for more information. You get it using either »`texdoc tlmgr`« or »`tlmgr help`«. By the way: Sometimes, the user mode can also be used to update packages and install packages if you do not use Vanilla TeX Live but the TeX Live packages of a Linux distribution.

#### Verified package installation with TeX Live since 2016

Since TeX Live 2016 TeX Live provides verified package repositories. This works only if `gpg` or `gpg2` has been installed.

My repository also has a digital signature. `tlmgr` can only verify the signature if you first install the needed public key. The finger print of the key is:

`654E 0E2F 3E1F 283C BA58  37A1 4B8E DF5B ACB5 A37E`

The public key is:

```-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFPkjooBCAC56Bj9QXCC8bxycA6yFXn3lBG+uhKmQw5Kc0orL/FoCsvaNh+K
V6AUWeeOIpK4AqYxdeGNpnSDTiMsRljUtTpYuEgwslW+QiL1XviDaTkQsFQybV7n
4ktgX94xEkS0wQJjW0GGvGuTStIMSw9BLR1P1XbA+h24aEXNB95SopBB8UG23FNR
THamE0GnWDT0Q5cm9135pNPuGsc/LwFWyT47p/314LEonKhWVgqB4ZFHnzErP1qX
VGrimR7XYE4SLZO/5d15T8V7lQEP8ItxdoRLE6C5Ba/jQxzHPuqX4s6saNdkYRAJ
fQthp1DtIifIWlpXouLwjL3KzUcmzEmkHZ0tABEBAAG0UEtPTUEucmVwbyAo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L5XqnVnceQwdomDG6Q24d/taT9G0P72PXLeRDVCFJzzED2
FJcOd4Ni8U1vquhsJrXpIouZbPMCfzRyXJElx0f7hwDNMgqaWIN2LXZyBi7lJLHo
Doq0/3J2kQP/FRjg50UylcAzErjtXfSkfbiBkqaXQ75lgqwnwHbYpgi1XSmx8VeR
XOcC6xmTo5VSeW5TkL4pYMZ8Y9TD+ubNCPuaxH1+nB22Oecb1LVwAfPScs3Oy9DF
uH5TtPVwiiapRjWN/lMWL/cpUgNppcz5sqCsTMo1ne9hupXodVHblGX90M6Mz1T+
2qeOxniJhJpzClPC2Y7aMGvJpIHr1GULqvdWuAfmya/muBz7zfJuYGhViHSBbayA
y+NZX7NQ1jw1eN+SmwWoGKc9TP/vnnbiok7OsPEFQwbdYdDs40vQ5YXSct7KoktP
6V4BsxPsb5BlB+Yl8TBMig3aJp+euSHiJM0IdympD+/vlPX8ETJeKOrfiKpP6vPq
8I2wqbn4qxUDyC6ZD1InXJXd9FB4G8t96zgiB798BKnPxI96/6kmgZIcNm5RABEB
AAGJATwEGAECACYCGwwWIQRlTg4vPh8oPLpYN6FLjt9brLWjfgUCXHjzlAUJCnWY
igAKCRBLjt9brLWjfha0B/wLhB5TQo9sHzYgleTfWlG3tjbWGE1vzgtussxLZa8W
QBO84gBoPPy5Ke8kMvDzYL9OLvxw+lXi4IvJBRwWgKx+5A2F5J3XUTF+E1SF45+f
Ocx0EpKLIBhE335Gi6QCQTemdHGZKVolSU3epMx/0m6oJL5sgtKyFx+1BWB7uyz5
WYnQ/1MkAiC9W2RqylC2gKFo2anmPUDsfnUnBxJGkMsEtVk0hqV8Ck8MxvM/En53
741PFP2B5yTD6ODw3HEyDA1VmoDqfYTyZ4dMBST1RJvf
=euLd
-----END PGP PUBLIC KEY BLOCK-----```

But do not add the key to your usual keyring. You should add it to the keyring of TeX Live using `tlmgr`. To do so, you should first save the key as file `KOMA.repo.asc` and then call:

`tlmgr key add KOMA.repo.asc`

You can list the keys using:

`tlmgr key list`

For TeX Live 2019 it should result in:

```/usr/local/texlive/2019/tlpkg/gpg/pubring.gpg
---------------------------------------------
pub   rsa2048 2016-03-19 [SC]
C78B82D8C79512F79CC0D7C80D5E5D9106BAB6BC
uid           [ultimate] TeX Live Distribution <tex-live@tug.org>
sub   rsa2048 2016-03-19 [E]
sub   rsa2048 2016-03-19 [S] [expires: 2019-08-31]

/usr/local/texlive/2019/tlpkg/gpg/repository-keys.gpg
-----------------------------------------------------
pub   rsa2048 2014-08-08 [SC] [expires: 2020-08-01]
654E0E2F3E1F283CBA5837A14B8EDF5BACB5A37E
uid           [ unknown] KOMA.repo (This key is used only to sign my repositories.) <komascript@gmx.info>
sub   rsa2048 2014-08-08 [E] [expires: 2020-02-29]```

The file paths and the expire dates may differ. For TeX Live 2016 and 2017 also only the last eight digits of the fingerprints are shown.

Please note, if you have a multi-user installation of TeX Live on Windows, you have to start `tlmgr` as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide key management only for user root. In this case you can use `sudo` to execute `tlmgr`, e.g.:

`sudo tlmgr key add KOMA.repo.asc`

As far as I know, key management in user mode is currently not supported by `tlmgr`.

Nevertheless, you can use TeX Live since 2016 without repository verification. See the manual for more information. You get it using either »`texdoc tlmgr`« or »`tlmgr help`«.

1—For compatibility https://www.komascript.de/repository/texlive/2016, https://www.komascript.de/repository/texlive/2017 and https://www.komascript.de/repository/texlive/2018 are still working but it is recommended to not use them any longer.