1

The TeX live installation bundled with TeXmaker in ubuntu (Xubuntu 11.10) is ancient and was breaking the acronym package (and who knows what else) so I though I'd update by installing using tl-install direct from CTAN. But after removing TeXmaker through ubuntu software centre and installing the new copy, I still have a whole Tex live install under /usr/bin, and the new install under /usr/local/texlive/2013/bin/x86_64-linux. Although I've added the latter location to my path (as prompted by tl-install), which pdflatex still tells me it's using the copy in /usr/bin.

I need a way of forcing the new version to be used. It took 3 hours maxing out my bandwidth to install, so removing all packages with tex in the name (or similar) and reinstalling isn't really an option.

I don't have to uninstall all the old stuff - I'm not short of disk space.

The easiest way is presumably to delete all the tex-related binaries in /usr/bin - but how do I find them all?

  • 2
    @someonr I wouldn't recommend this procedure, but rather to modify the PATH environment variable. – egreg Dec 2 '13 at 20:59
  • @egreg: I think that is personal preference ;) I removed my comment, because some people might not like a "messy" /usr/local/bin. Anyway this is the default linking folder in This is install-tl optional default linking folder under options (create symlinks in standard directories:) . – someonr Dec 2 '13 at 21:02
  • I doubt it came bundled with TeXmaker itself. Probably your package manager installed it as a dependency when you installed TeXmaker. The cleanest solution is to use your package manager to uninstall the installation of TeX you have under /usr/bin etc. It is possible that your package manager won't allow this if you are using an editor, for example, which requires it. In that case, you can install a "dummy" package if one is available for Ubuntu. (This works fine on Debian.) Otherise, make sure the /usr/local/... gets added at the START of your PATH variable. – cfr Dec 3 '13 at 0:47
  • @cfr - make sure the /usr/local/... gets added at the START of your PATH variable - Thank you! - that should sort it. I don't use a TeX-specific editor, and apt-get autoremove didn't remove what should have been "dead" dependencies that didn't appear in ubuntu software centre (which was my first mistake). With no version numbering reported by dpkg I was at a loss to find which packages to remove. If you feel like posting your comment, or the last point of it, as an answer, I can accept it. – Chris H Dec 3 '13 at 10:35
  • 2
    It can be 1/2 night while you are sleeping :) – ajeh Dec 4 '13 at 14:13
2

So there are two ways of solving the problem. The cleanest is to delete the TeX distribution installed by your package manager, using your package manager.

If you use a dedicated editor for TeX or a plugin which is TeX-specific, your package manager may not let you do this due to dependencies. In that case, the best solution is to install a "dummy" package which satisfies the dependencies but doesn't actually install anything. I've done this on Arch Linux, Fedora and Debian so it should be possible with most GNU/Linux distros.

Otherwise, you need to make sure that the /usr/local/... path for your new TeX distribution gets added at the START of your PATH variable. This way, your shell will look there first and your newly installed binaries will take precedence over the outdated ones installed by the package manager.

  • Texmaker can be installed from tgz (or does he provide an rpm now? Can't remember.) quite easily, thus blowing away all tex packages and installing texlive should be safe from that perspective. – ajeh Dec 3 '13 at 21:16
  • The issue is if you want to install something through your package manager which depends on TeX. You could also install an editor or whatever under /usr/local but it is easier in many cases to use that provided by your package manager. Providing a "dummy" package lets you install TeX Live under /usr/local using TL's own installer but still have the benefit of your distro's package manager for software which depends on TeX. Moreover, other packages may depend on TeX, too. For example, you might want to have a LaTeX plugin for vim but you probably don't want to install vim in /usr/local. etc. – cfr Dec 3 '13 at 23:00
  • @cfr I want to remove all texlive package which was installed from ubuntu repo without affecting my texlive-2016 package which was installed from tug.org. How can I do in terminal? My question is here tex.stackexchange.com/questions/389832/… – alhelal Sep 5 '17 at 13:42
  • @BandaMuhammadAlHelal You need to use your distro's package manager (apt or whatever you usually use). You must install a 'dummy' package to satisfy dependencies. Otherwise, you'll pull everything back in when you install an editor or whatever. – cfr Sep 5 '17 at 15:18

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.