2

Is there a way to dump the list of installed package to be used as a basis for a new installation with tlmgr ? The same way pip works:

pip freeze > requirements.txt

then later, after a fresh git clone

pip install -r requirements.txt

Note: This is not a duplcate from How to print the list of packages installed on TeX Live to a file? because my question has two parts. One to list the requirements and one to install from that list, which is not answered by the former.

  • It's better to edit your original question with the explanation why it's not a duplicate, I'll comment there (and vote to delete this one). – Marijn Feb 12 '20 at 12:33
  • @Marijn The duplicate notice above the previous question says: "If this question doesn’t resolve your question, ask a new one." – Luke Skywalker Feb 12 '20 at 12:37
  • Ah yes, it does say that :) however, that is not really the best advice most of the time. Sorry for the confusion. – Marijn Feb 12 '20 at 12:38
  • See also https://meta.stackexchange.com/a/337015 for a meta-discussion on this subject. – Marijn Feb 12 '20 at 12:40
  • 1
    On Linux or similar: tlmgr list --only-installed > installed_texlive_packages.txt (taken from the linked Q&A) and later on the new installation tlmgr install `cat nstalled_texlive_packages.txt` should work. – Martin Scharrer Feb 13 '20 at 08:00
  • Which will limit the number of packages you can install because of ARG_MAX STRLEN. It's more a workaround than the actual answer to the question, but indeed it works and is more or less what I was going to do (xargs). The point of the question was to know if there was a proper solution. Apparently not, so that's what the accepted answer should be: You can't install from a file with tlmgr. – Luke Skywalker Feb 13 '20 at 08:08
  • @MartinScharrer doesn't work on both my mac and linux (TL2021). Weird they have a way to export the list but no way to install from the list – Minh Nghĩa Apr 03 '21 at 09:39
  • 1
    @MinhNghĩa: the output format changes. You need to use now: tlmgr list --only-installed --data name > installed_texlive_packages.txt – Martin Scharrer Apr 14 '21 at 14:29

0 Answers0