I installed texlive by downloading, extracting and running sudo ./install-tl.

I want to use tlmgr for installing a package, eg

jdoe@jdoe:~$ tlmgr install moderncv
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2015/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.

Now, I guess that it it will run without errors if I use sudo, but I have not tried that. I thought it would install to ~/texmf, which should not require sudo, and that is also what I would prefer.

  • Isn't it supposed to install to ~/texmf, and thus not require sudo?
  • How do I install to ~/texmf?
  • You seem to be confusing your managed tree (installed by install-tl and in your case owned by root) with the 'personal' tree for stuff you add (|/texmf). You can happily install TL without sudo in your home directory, but not normally to use ~/texmf for additional stuff.
    – Joseph Wright
    Jan 20, 2016 at 12:59
  • So, to install packages locally, to ~/texmf using tlmgr, I need to install texlive for each user (and not needing any global installation)? Jan 20, 2016 at 13:05
  • I previously installed texlive on Ubuntu with apt-get. Texlive then godt installed globally; and packages installed with tlmgr were installed locally in ~/texmf. That's why I expected the above described behaviour. Jan 20, 2016 at 13:08
  • perhaps the answer to tex.stackexchange.com/questions/55437/…, especially the bit about changing ownership, might be helpful here...
    – cmhughes
    Jan 20, 2016 at 15:57
  • 2
    Of course, in general I would not recommend installing tl as root. If you want to locally modify some package, then that package will never be installed by tlmgr, that is not what it is made for. Besides, never modify a package under the same name as the original. Make a copy under a new name, modify that and use that version.
    – daleif
    Jan 20, 2016 at 19:31

2 Answers 2


tlmgr by default installs into the location of the original installation, in your case /usr/local/texlive/2015. This is common practice in multi-user environments, and it also is correct that only root or similar admins can change the installation.

There is a special mode for tlmgr, called User Mode, that allows installation of some packages into an arbitrary tree, by default TEXMFHOME which is ~/texmf. For this you have to first run tlmgr init-usertree, and after that you can install package with tlmgr --usermode .... I recommend reading the relevant section in the documentation, first: https://www.tug.org/texlive/doc/tlmgr.html#USER-MODE

Finally, if you can run sudo I suggest managing (that is installing, removing etc) the TeX Live installation via sudo tlmgr, otherwise you might end up with several copies of the same package, some of them outdated.

  • Who can change the installation depends on who installed it with what privileges. I explain here how to create and use a dedicated non-privileged user to do this. [I realise that this comment is like telling my grandmother how to suck eggs. It is just a pointer for any non-grandmothers who have yet to learn the knack.]
    – cfr
    Jan 21, 2016 at 0:59
  • 1
    @cfr indeed, but in practically all instances if the installation is found in /usr/local/texlive/ it was root. My reasoning: Someone who manages to install as non-root into /usr/local/ normally knows what it implies ;-)
    – norbert
    Jan 21, 2016 at 1:02
  • When I use sudo tlmgr the following error appears: sudo: tlmgr: Befehl nicht gefunden (German for command not found).
    – DonMeles
    Dec 29, 2023 at 11:37
  • @DonMeles because you probably installed for the normal user, and have set up the PATH only for the normal user. But if you do sudo all of that is obliterated and root runs with a clean environment, so the PATH does not contain tlmgr.
    – norbert
    Jan 11 at 0:11

Norbert's Answer simplified: (I also needed -ignore-warning)

tlmgr init-usertree
tlmgr -ignore-warning --usermode install acro datetime2 elsarticle inputenx newunicodechar pdfcomment pstool soulutf8 tablefootnote tabu textpos threeparttable wrapfig

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .