I am using the following command to update my TeXLive 2019 installation on Ubuntu (installed it from CTAN, not packages) on a weekly basis to keep my packages reasonably up to date:

sudo /usr/local/texlive/2019/bin/x86_64-linux/tlmgr update --self -all

This works as expected, even when called using a shell script (sudo /root/bin/updatetexlive):


/usr/local/texlive/2019/bin/x86_64-linux/tlmgr update --self -all

However, when I invoke this using cron (sudo crontab -e):

20 23 * * sun /root/bin/updatetexlive

(Every Sunday at 11:20 PM.)

I get the cryptic error:

Unable to download the checksum of the remote TeX Live database, but found a local copy, so using that.

You may want to try specifying an explicit or different CTAN mirror, or maybe you need to specify proxy information if you're behind a firewall; see the information and examples for the -repository option at https://tug.org/texlive/doc/install-tl.html (and in the output of install-tl --help).

tlmgr: package repository http://ctan.math.utah.edu/systems/texlive/tlnet (not verified: u nknown) tlmgr: saving backups to /usr/local/texlive/2019/tlpkg/backups

As a matter of general rule, when something fails in cron when it works on the command line, usually an environment variable related to the calling shell is at fault. So, I looked in my list of export's on the commandline, and found three possible variables. I set them in the crontab:


However, I still get the error above. How do I make tlmgr run as a cron job?


It was a proxy issue. Needed to set the http_proxy, http_proxy and ftp_proxy variables to the right values (in crontab), and it worked.


Note that you have to specify the full URL for this to work.

Updating your tex database on a regular basis using a cron job should be the recommended standard operating procedure on Linux/Unix/Mac OSX installations.

  • On single user machines I try and be very careful about when I update TeX. If I have a deadline on Monday, I sure as heck don't want to update and break something on Sunday night.
    – StrongBad
    Dec 26 '19 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.