0

Background

My main goal is to compile my thesis in latex under POP-OS 22.04. (I used to use Miktex on Windows or Ubuntu). Now I have installed TexLive in a non-standard location (passing --texdir=/media/applications/TexLive to the execution script) to save some space on the SSD drive dedicated to the system.

The number of problems that I now face makes me question this decision... I don't know how many of them are related to the non-standardness of the installation (at least this one). Having learned my lesson, I want to remove the current distribution completely and try a different approach (e.g., Miktex or standard installation).

Problem

Following the (incomplete imho) documentation, I execute:

tlmgr init-usertree
tlmgr uninstall --all
> (...)
> If you answer yes here the whole TeX Live installation here,
> under /home/maverick/texmf, will be removed!     # (note the wrong path to the installation folder!)
Yes

Now I get 9999 lines of messages like rm: cannot remove '/usr/share/texlive/readme-txt.dir/README.ES': Permission denied followed by Sorry, something did not get removed under: /usr/share/texlive

And it looks like not a single file has been deleted. Then, I checked the variables defining paths to predefined trees and noticed that:

kpsewhich -var-value=TEXMFHOME
> /home/maverick/texmf
kpsewhich -var-value=TEXMFDIST
> /usr/share/texlive/texmf-dist

All other variables point to similar places, and not a single one refers the installation path /media/applications/TexLive. This fact, combined with the wrong path to the installation folder specified above, makes me think that TexLive isn't fully "aware" of this non-standard installation...

Questions

  • What do I need to specify to delete TexLive properly? Maybe I'm missing something.

  • Are there steps to learn more about this problem? I read the documentation, but it's not possible to read all of it.

  • If nothing works, is it safe to just delete all directories specified in these variables and the installation folder?

Maverick
  • 303
  • Looks to me like you have multiple (partial or complete) TeXlive installations at the same time, and there's confusion over which one is being invoked. What's the output of which -a tlmgr: is there more than one? If you installed the other through the distro's package manager, try uninstalling it with that first, and then try uninstalling with sudo. Having the installation in a nonstandard place shouldn't be causing so many problems, but if you have multiple ones installed, there's bound to be confusion. – frabjous Oct 25 '22 at 17:53
  • You linked to another question that is about cygwin, which I'm sure you're not running on PopOS, so I don't see how it could be related. TeXlive is generally more reliable than MikTeX on linux. – frabjous Oct 25 '22 at 17:56
  • the output of which -a tlmgr yields: /usr/bin/tlmgr /bin/tlmgr /media/applications/TexLive/bin/x86_64-linux/tlmgr /media/applications/TexLive/bin/x86_64-linux/tlmgr (the same second time). I installed TexLive only once via perl script, but it really looks strange... – Maverick Oct 25 '22 at 18:10
  • 1
    so you have a system tex installed in /usr/bin and have not changed the PATH so you are not using the one you installed. To delete the one you installed just delete the directory or to use it add /media/applications/TexLive/bin/x86_64-linux to the front of your PATH – David Carlisle Oct 25 '22 at 18:13
  • 1
    Some of those are presumably just symlinks, but it does looks like you have more than one version installed. Since the ones in /media/applications were at the end of the PATH, probably they were never used; hence your problems. Uninstall the others or rearrange your PATH. If you want to interact with a specific one, you can also just type in the full path to the executable directly /media/applications/TexLive/bin/x86_64/tlmgr uninstall --all. – frabjous Oct 25 '22 at 18:27
  • 1
    My guess about how this happened if you only intentionally installed it once: you may have used the distro's package manager to install something that listed TeXlive as a dependency, like a TeX editor. Since you didn't install TL through the distro's package manager, it didn't know it was already installed, and so it installed the .deb packages from Pop's repos, leaving you with multiple installations. Consider using something like this to satisfy apt. – frabjous Oct 25 '22 at 18:37
  • You were correct about everything! 1) /media/applications/TexLive/bin/x86_64/tlmgr uninstall --all worked, and now which -a tlmgr produces only /usr/bin/tlmgr and /bin/tlmgr. 2) It appears when installing Texstudio from PopShop (even the .deb version), you get TexLive (probably some minimal version) in those directories. Once I removed Texstudio, most of the remaining files were gone. Thank you ! ! – Maverick Oct 25 '22 at 20:44

1 Answers1

0

As Frabjous rightly pointed out, my problem was that I had multiple TexLive managers installed: one downloaded from TexLive site and one from Pop_shop (.deb version). Secondly, I appended the PATH variable with the path to the manual distribution, whereas it should have been prepended.

For me, /media/applications/TexLive/bin/x86_64/tlmgr uninstall --all was enough to uninstall the "manual" distribution, and then I just deleted the .deb version via Pop_shop.

Ultimately, the Flatpak version of Texstudio worked for me.

Maverick
  • 303