It seems that I have two installations of TeXlive, one of which is more updated.

When I run latex, it seems to search packages inside the old installation. How can I direct latex to look for the updated installation?

All my packages in the new installation (such as tcolorbox) are listed as directories in the directory /usr/local/texlive/2015/texmf-dist/tex/latex/.

The old installation lists the package files in /usr/share/texlive/texmf-dist/tex/latex/.

Also, the command which latex gives /usr/bin/latex.

  • Set the paths correctly (or whatever Windows requires). What OS do you use?
    – jon
    Jul 3, 2015 at 16:34
  • I use Ubuntu 14.10. How do I set the paths permanently (if possible)? Thank you.
    – usr203050
    Jul 3, 2015 at 16:47
  • 2
    If you don't actually need both distributions, the best way to go is to remove the outdated one. Things will be much simpler that way. But if you really need to have two or more TeX distributions, the other path-related comments will be useful. Jul 3, 2015 at 17:29
  • 1
    Do not use sudo gedit ~/.profile! You should not need sudo to edit a file in your home directory.
    – jon
    Jul 3, 2015 at 17:48
  • 1
    No: The $PATH variable is so your system can find the commands latex and so forth, not find the packages.
    – jon
    Jul 3, 2015 at 18:34

1 Answer 1


The path variable can be set in TeXstudio in options -> Configure TeXstudio -> Build.

Then tick the Show Advanced Options in the lower left corner.

Then put your path in Commands, in my case it is


click OK.

If your path is set in .bashrc to include the texlive installation, then you can test it with opening TeXstudio in a terminal which has the correct $PATH value. With which you can find the path to the pdflatex:

$ which pdflatex /usr/local/texlive/2018/bin/x86_64-linux/pdflatex

and paste it into TeXstudio.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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