TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the BasicTeX distribution on OS X and recently upgrade from the 2011 to the 2012 distribution. This forces me to add the packages that I had added over time to the BasixTeX 2011 installation by pulling them from the online repository with tlmgr. Is there a good way to list these packages that are not part of BasicTeX but are part of the complete TeXLive?

share|improve this question
Normally you add local packages outside your main tex distribution tree, so when you update your distribution the locally installed files are still there and still on tex's search path, but I don't know the details of this distribution (or OS X) – David Carlisle Dec 21 '12 at 11:41
To clarify: I used TexLive's own package manager tlmgr to add packages (or rather TeX Live Utility which provides a GUI). – Christian Lindig Dec 21 '12 at 12:10
With miktex one can import packages installed in a previous version. But I don't think that the same feature exists in TeXLive, at least I never saw it mentioned. In TeXLive the default installation is "full" - incomplete installations are a bit tiresome as there is no on-the-fly installation. – Ulrike Fischer Dec 21 '12 at 12:36
do you still have the old installation installed? If you do you could use tlmgr list to get a list of installed applications and massage that into a tlmgr update command in the new installation. – David Carlisle Dec 21 '12 at 12:38
I have the old installation around but will have to check that each installation indeed refers properly to its own files. I'll also take a look at the formats. The Unix comm(1) tool should come handy. – Christian Lindig Dec 21 '12 at 14:20
up vote 9 down vote accepted

Thanks to David Carlisle for the suggestion. Here is a line in Bash to find all packages that only exist in the old installation but not in the new one:

comm -23 <(/path/to/old/tlmgr list --only-installed | sed 's/:.*$//') <(/path/to/new/tlmgr list --only-installed | sed 's/:.*$//')

The comm(1) command takes two sorted files and finds commonalities. The flag -23 suppresses output of lines found only in the new and in both installation leaving those found only in the old installation. I'm using sed(1) to remove package descriptions as these might have changed.

This should work for any TeXLive installation but is probably less useful for the full installation.

On a typical installation, the path to tlmgr is: /usr/local/texlive/2015basic/bin/universal-darwin/tlmgr.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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