Up until now I was under the impression that TeXLive's packages only updated when you invoked tlmgr update ....

But today I noticed, for the first time, that some other process is definitely updating TeXLive packages. But I have not been able to identify which. So I'm looking for advice on how to determine what is causing these updates, and possibly help on how to stop these auto-updates from happening. More details below if you'd like to read on ;-)

TLDR: TeXLive packages auto-update on irregular intervals by some mysterious process. One of these updates left me with a broken install, and now I'd like to be able to disable any auto-updates of TeXLive.

I have installed TeXLive 2020 on Ubuntu 18.04.5. I also have an old 2019 installation still in place, but all paths are since long correctly set for TL2020. I installed and maintain TeXLive (in fact, the whole system) using Ansible (I haven't made those playbooks public yet because reasons, but if you think it helps trouble-shooting this issue, I'd be happy to share the relevant parts with you).

How do I know for sure that TeXLive's packages have been updated?
Well, after a recompilation of the exact same LaTeX document (on the same git commit, clean repo) suddenly failed the second time around with an error about filehook-2019.sty not found, which made no sense, I looked for any files in the TeXLive tree that had been updated recently (i.e., today) and found a bunch, most notably (showing a selection):

$ find /usr/local/texlive -newermt "2020-12-16"

The clincher was the contents of the tlmgr.log file (again, only showing select parts):

[Sun Nov 29 04:34:29 2020] update: bookcover (46410 -> 56947)
[Tue Dec 15 21:27:05 2020] update: beamer (55908 -> 57140)
[Tue Dec 15 23:11:08 2020] update: decision-table (56164 -> 57094)
[Tue Dec 15 23:11:08 2020] update: denisbdoc (55474 -> 56664)
[Wed Dec 16 02:41:56 2020] update: fgruler (42966 -> 56854)
[Wed Dec 16 02:41:57 2020] update: filehook (56291 -> 56479)

The timings of these updates suggests that they are unrelated to my activities (which involves running latexmk, lualatex, knitr::knit()). Also, it's not an update of all available TeXLive packages, just a small subset, which I could confirm by running tlmgr update --self --all myself a short while later, which updated around 100 packages and after which my LaTeX document compiled just fine again.

I have read the relevant parts of the TeXLive and tlmgr documentation, but found no mention of auto-updates.

On my machine, I have checked the user and system cron-jobs, and found nothing that pertains to tlmgr. I also checked the systemd jobs, ditto.

If by chance it's not tlmgr that's causing these updates, then what could it be? I also have R installed on this machine (I regularly knit Rnw/Rmd documents) which includes the tinytex R package, which I know contains a wrapper for tlmgr. But unless these are being activated on some schedule, or are invoked when knitr::knit() is called, I don't see how they are the culprits (also, I run knitr::knit() almost daily, and TeXLive package auto-updates appear to happen on much longer intervals as the log file shows).

  • I don't have R installed these days but if knitr starts with tinytex (minimal texlive) does it run tlmgr for you for latex packages that are referenced from R? Commented Dec 16, 2020 at 9:10
  • @DavidCarlisle You put your finger on the point precisely. Problem is, I'm not sure. I skimmed the knitr::knit() source code, but I can't claim to follow along well enough to determine whether it's calling tinytex::tlmgr(). And tinytex is a dependency of other R pkgs I require, so I can't simply uninstall it to try without it... Commented Dec 16, 2020 at 9:22
  • random google search shows up this which does indicate that tinytex can be configured to parse the log for missing packages and install them. Commented Dec 16, 2020 at 14:06
  • @DavidCarlisle I considered that, but that's installation of missing packages. That did not happen in my case Commented Dec 16, 2020 at 17:33
  • (Stupid comment system blocking edits... when I pressed enter by mistake earlier). @DavidCarlisle That did not happen in my case, it's only package updates. And as far as I know, tinytex does not do that. Assuming that conclusion is correct, that leaves latexmk and tlmgr. But I take it from your focus on the R tools that those tools are not known to auto-update TeXLive packages either, right? But I must admit that my initial suspicions veer towards the R toolset, too. There's been so much development there, some of it focussed on making the users life easier... Commented Dec 16, 2020 at 17:41

1 Answer 1


When compiling .Rnw or .Rmd documents to PDF, the R function tinytex::latexmk() is called, which tries to install missing LaTeX packages by default. This behavior can be disabled via the option:

options(tinytex.install_packages = FALSE)

Before trying to install missing LaTeX packages, it will try to run tlmgr update --self --all. This is most likely to be the cause of the problem you observed.

  • 1
    Thanks for that insight! I will set this option, as you suggested, and keep an eye on the tlmgr.log etc. to see if updates keep happening, and report back here in a few days with confirmation (although I don't expect any surprises, your explanation makes a lot of sense to me). Commented Dec 27, 2020 at 9:01
  • One month later, many LaTeX and R re-runs later, and the tlmgr.log has not been touched. This setting definitely works as intended :-) Sorry for the delay in accepting the answer. Commented Jan 24, 2021 at 23:31
  • Could you guide exactly Yihui how to apply that option you specified please? I am trying to apply it via ``` tinytex::latexmk(file="myfile.Rmd", options(tinytex.install_packages = FALSE)) ``` but it fails because I need a .tex rather than .Rmd. But I need it to work to render to generate the .tex, so I am stuck. Thanks for all your work on TinyTeX (and remark!), and any help would be much appreciated.
    – Notches
    Commented Sep 22, 2023 at 20:23
  • @Notches This option is meant to be set in either a code chunk of your input document, or your .Rprofile (file.edit('~/.Rprofile')). The former setting only applies to that document, and the latter applies to any documents on your computer. It depends on whether you want to set the option locally or globally.
    – Yihui Xie
    Commented Sep 25, 2023 at 15:26
  • @YihuiXie I'm wondering if turning off above option would also disable automatic package updates? Or, is there a way to disable running tlmgr update --self --all? Commented Jan 18 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .