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?
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 withsudo. 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:53which -a tlmgryields:/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/media/applications/TexLive/bin/x86_64-linuxto the front of your PATH – David Carlisle Oct 25 '22 at 18:13/media/applicationswere 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/media/applications/TexLive/bin/x86_64/tlmgr uninstall --allworked, and nowwhich -a tlmgrproduces only/usr/bin/tlmgrand/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