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

Is there a LaTeX command for printing the versions of the currently installed packages? I need to know the installed version of the pgfplots package.

share|improve this question
with vanilla TeXLive distro, On command line/Terminal invoking tlmgr info pgfplots gives the version of pgfplots installed. – texenthusiast Apr 4 '14 at 14:56
up vote 58 down vote accepted

Add \listfiles to your preamble and then look at the .log file. This will tell you the current version of all the packages loaded.

share|improve this answer
Package versions are announced in the .log file even without \listfiles. – Andrey Vihrov Mar 13 '11 at 12:28
@Andrey: makes them easier to find, thought :-) – Joseph Wright Mar 13 '11 at 12:30
It might be interesting to write a command line tool to check that. – ℝaphink Sep 16 '11 at 8:54
@ℝaphink I have attempted, but the fact that TeX hard-wraps the output makes it very difficult. – Sean Allred Oct 24 '15 at 16:30

If you need to know this 'programmatically', then you can use the LaTeX kernel function \@ifpackagelater to test by date:

    % Do something for the newer version
    % Do something different for the older version

The information is stored inside a special macro, so if you just want to 'take a peek' you can use that. Taking pgfplots as an example

\expandafter\show\csname ver@pgfplots.sty\endcsname

Notice here that this needs the full file name we are interested in, so works for any file that contains suitable information (i.e. form \ProvidesPackage, \ProvidesClass or \ProvidesFile).

share|improve this answer
Thanks, this is definitely useful as well. – Tim N Mar 13 '11 at 12:37
you can load the name into a macro by \edef\foo{\csname ver@pgfplots.sty\endcsname} – wasteofspace Mar 13 '11 at 12:48
@anon: It's already in a macro, just one with an awkward name :-) – Joseph Wright Mar 13 '11 at 12:51
@Andrey: Done, clearly I hope. – Joseph Wright Mar 13 '11 at 13:02

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.