[Tex/LaTex] TeX Live manager 2011 database corruption

expl3luatextexlive

TeX Live 2011, up to date, on Windows XP. Example:

\listfiles
\documentclass{article}
\usepackage{fontspec}
\begin{document}
A
\end{document}

LuaTeX first error:

LaTeX Warning: You have requested, on input line 20, version
           `2011/09/05' of package expl3,
           but only version
           `2011/04/09 v2222 L3 Experimental code bundle wrapper'
           is available.

(c:/Programme/texlive/2011/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
! Undefined control sequence.
<argument> \ExplFileName 

l.57 ...e}{\ExplFileVersion}{\ExplFileDescription}

Ok, but now it get's weird, this output is from console window:

U:\>tlmgr version
tlmgr revision 23514 (2011-08-12 23:36:21 +0200)
tlmgr using installation: C:/Programme/texlive/2011
TeX Live (http://tug.org/texlive) version 2011


U:\>tlmgr remove expl3.sty
expl3.sty: package not present, cannot remove
tlmgr: no packages removed.

U:\>kpsewhich expl3.sty
c:/Programme/texlive/2011/texmf-dist/tex/latex/expl3/expl3.sty

So TeX Live 2011 is not aware of the fact that the to-be-deleted package still exists. As far as I know, the package and many others have been replaced, see here:
http://comments.gmane.org/gmane.comp.tex.latex.latex3/2619

Any ideas?

Best Answer

I've experienced this problem. I found my TeXLive had two different expl3.sty-s:

<root>\texmf-dist\tex\latex\l3kernel\expl3.sty
<root>\texmf-dist\tex\latex\expl3\expl3.sty

Whether I did this through something silly, or TexLive Manager didn't uninstall the expl3 package at the right moment, I'll never know.

To fix it, I deleted the second of the two files and ran mktexlsr (check which file you're deleting.

Your mileage may vary. Sorry for the Windows path separators.