Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I installed TeX Live 2013 from CTAN by following the instructions here: How to install "vanilla" TeXLive on Debian or Ubuntu?

And it's all working very nicely. However, what I didn't do was purge the original TeX from my Ubuntu 12.04 system. The command

dpkg --get-selections | grep tex

shows a vast panoply of installed TeX packages. Now, suppose I entered:

apt-get purge tex*

Would that remove just the original TeX packages installed from the Ubuntu repositories, or would it, since my fiddling with equiv, kill the new TeXlive as well?

I don't want to experiment, as I now have TeX and friends up and running as I like, and I don't want to have to do it all over again!

share|improve this question
You only need to set up $PATH to point to the new installation. Here I have echo $PATH /usr/local/texlive/2013/bin/i386-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:‌​/usr/bin:/sbin:/bin:/usr/games –  Sigur Jan 30 at 23:29
It shouldn't, but I haven't tried in a few years. However, the middle ground between leaving them and removing them is to remove all the Apt-installed files relating to 'fonts' and 'doc': they usually take up the lion's share of disk space. –  jon Jan 30 at 23:45
@Sigur That's only true if you don't want you use your distro's package manager to install anything with a tex-related dependency. Lots of people will want to install e.g. an editor this way. Hence the stuff with equiv (which I think is something like installing a dummy package with other Linux distros). –  cfr Jan 31 at 0:06
Yes, I set my PATH to include /opt/texbin and that's fine. But in the interests of de-cluttering my system, I'd like to remove all the previous TeX material that isn't part of the new TeXlive install. –  Alasdair Jan 31 at 1:04
Guys, I think that I'll delete my poor answer to avoid confusion. Sorry for those who wrote comments there. –  Sigur Jan 31 at 10:58

1 Answer 1

Edit your .bashrc and insert

PATH=/usr/local/texlive/2013/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2013/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2013/texmf/doc/info:$INFOPATH; export INFOPATH

Replace mine path to yours.

Or edit /etc/environment as suggested by @daleif.

share|improve this answer
It is recommended not to set MANPATH in general. I'm honestly not sure how this should be handled because putting that in .bashrc will likely give quite the wrong result. (Typically, only the texlive directory will end up in MANPATH and this will prevent man from finding manpages for everything else.) Or do you know that Ubuntu is an exception on this and sets MANPATH explicitly? (A typical setting for MANPATH is nothing at all, in which case locations are deduced on-the-fly on the basis of PATH. But this does not seem to work for texlive.) Also, see my comment above. –  cfr Jan 31 at 0:10
Well, now I am confused I had never had troubles with man. –  Sigur Jan 31 at 0:30
Hmm... Maybe it tacks it on to the on-the-fly creation rather than replacing it, in that case? Apologies. I'm sure I tried this a couple of years ago and it didn't work at all, but now it seems it works even though echo $MANPATH gives nothing. I wonder if it is still recommended not to set it at all in this case? Or if it is just recommended now not to overwrite the system manpath? (So supplementing it for texlive would be fine and I could maybe get apropos working for texlive!) You don't need to touch it at all just to use man by the way. –  cfr Jan 31 at 0:37
@Sigur, can it actually compile your documents? i.e. find LaTeX? I've seen many examples where they could not, because the shell the editor use to call LaTeX is not a BASH shell. Which is why I tend to recommend adding it to /etc/environment instead –  daleif Jan 31 at 11:27
@doed To test it I just did the following: Installed Ubuntu 13.10 virtually. Installed minimal TL13 (takes 2min). Installed texmaker using sudo apt-get install --no-install-recommends texmaker, and added the TL path to ~/.bashrc. Then I start texmaker via the dashboard (or what ever that is called), and it cannot find pdflatex. If I start TM from the command line, it starts in an environment where the PATH is set and it knows where pdflatex is and it works. But started via the dashboard it does not. This is why I do not recommand using .bashrc to add the PATH. –  daleif Jan 31 at 14:43

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.