I installed TeX Live 2023 using the script instead of the Arch Linux repository. However while installing other software some TeX Live packages made it into my desktop anyway, causing issues. So I tried to remove all texlive
packages.
Here is the list of packages texlive
packages installed on the system.
$ sudo pacman -Qs texlive*
local/texlive-basic 2023.66594-19 (texlive)
TeX Live - Essential programs and files
local/texlive-bin 2023.66984-16
TeX Live binaries
local/texlive-binextra 2023.66594-19 (texlive)
TeX Live - TeX auxiliary programs
local/texlive-context 2023.66594-19 (texlive)
TeX Live - ConTeXt and packages
local/texlive-fontsextra 2023.66594-19 (texlive)
TeX Live - Additional fonts
local/texlive-fontsrecommended 2023.66594-19 (texlive)
TeX Live - Recommended fonts
local/texlive-fontutils 2023.66594-19 (texlive)
TeX Live - Graphics and font utilities
local/texlive-games 2023.66594-19 (texlive)
TeX Live - Games typesetting
local/texlive-langcjk 2023.66594-19 (texlive-lang)
TeX Live - Chinese/Japanese/Korean (base)
local/texlive-langenglish 2023.66594-19 (texlive-lang)
TeX Live - US and UK English
local/texlive-langgreek 2023.66594-19 (texlive-lang)
TeX Live - Greek
local/texlive-langjapanese 2023.66594-19 (texlive-lang)
TeX Live - Japanese
local/texlive-langkorean 2023.66594-19 (texlive-lang)
TeX Live - Korean
local/texlive-langother 2023.66594-19 (texlive-lang)
TeX Live - Other languages
local/texlive-latex 2023.66594-19 (texlive)
TeX Live - LaTeX fundamental packages
local/texlive-latexextra 2023.66594-19 (texlive)
TeX Live - LaTeX additional packages
local/texlive-latexrecommended 2023.66594-19 (texlive)
TeX Live - LaTeX recommended packages
local/texlive-luatex 2023.66594-19 (texlive)
TeX Live - LuaTeX packages
local/texlive-mathscience 2023.66594-19 (texlive)
TeX Live - Mathematics, natural sciences, computer science packages
local/texlive-metapost 2023.66594-19 (texlive)
TeX Live - MetaPost and Metafont packages
local/texlive-music 2023.66594-19 (texlive)
TeX Live - Music packages
local/texlive-pictures 2023.66594-19 (texlive)
TeX Live - Graphics, pictures, diagrams
local/texlive-plaingeneric 2023.66594-19 (texlive)
TeX Live - Plain (La)TeX packages
local/texlive-xetex 2023.66594-19 (texlive)
TeX Live - XeTeX and packages
First, I attempted feeding pacman -S
to pacman -R
but since not every texlive
package was installed it did not go forward.
$ sudo pacman -R $(pacman -Ssq texlive*)
error: target not found: tectonic
error: target not found: texlive-bibtexextra
error: target not found: texlive-doc
error: target not found: texlive-formatsextra
error: target not found: texlive-humanities
error: target not found: texlive-langarabic
error: target not found: texlive-langchinese
error: target not found: texlive-langcyrillic
error: target not found: texlive-langczechslovak
error: target not found: texlive-langeuropean
error: target not found: texlive-langfrench
error: target not found: texlive-langgerman
error: target not found: texlive-langitalian
error: target not found: texlive-langpolish
error: target not found: texlive-langportuguese
error: target not found: texlive-langspanish
error: target not found: texlive-meta
error: target not found: texlive-pstricks
error: target not found: texlive-publishers
So I needed to somehow filter pacman -Q
instead. After a lot of attempts with my limited knowledge of grep
and parameter expansion I extracted the package names.
$ for i in $(sudo pacman -Qs texlive* | grep -Eo '^local/[[:alpha:]]+-[[:alpha:]]+')
do
echo ${i:6}
done
texlive-basic
texlive-bin
texlive-binextra
texlive-context
texlive-fontsextra
texlive-fontsrecommended
texlive-fontutils
texlive-games
texlive-langcjk
texlive-langenglish
texlive-langgreek
texlive-langjapanese
texlive-langkorean
texlive-langother
texlive-latex
texlive-latexextra
texlive-latexrecommended
texlive-luatex
texlive-mathscience
texlive-metapost
texlive-music
texlive-pictures
texlive-plaingeneric
texlive-xetex
Then I replaced echo
with sudo pacman -R
and ran the code.
$ for i in $(sudo pacman -Qs texlive* | grep -Eo '^local/[[:alpha:]]+-[[:alpha:]]+')
do
sudo pacman -R ${i:6}
done
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-binextra
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-context
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-fontsextra
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-fontsrecommended
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-fontutils
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-langcjk
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-langenglish
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-langgreek
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-langother
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-latex
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-luatex
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-metapost
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-pictures
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-plaingeneric
:: removing texlive-basic breaks dependency 'texlive-basic' required by texlive-xetex
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing texlive-bin breaks dependency 'texlive-bin' required by dvisvgm
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-basic
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-binextra
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-context
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-fontsextra
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-fontsrecommended
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-fontutils
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-games
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langcjk
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langenglish
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langgreek
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langjapanese
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langkorean
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-langother
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-latex
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-latexextra
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-latexrecommended
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-luatex
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-mathscience
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-metapost
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-music
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-pictures
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-plaingeneric
:: removing texlive-bin breaks dependency 'texlive-bin' required by texlive-xetex
checking dependencies...
:: python-matplotlib optionally requires texlive-binextra: usetex dependencies
Packages (1) texlive-binextra-2023.66594-19
Total Removed Size: 112.67 MiB
:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing texlive-binextra [##################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating TeXLive filename database...
(3/3) Updating TeXLive format files...
Can't locate mktexlsr.pl in @INC (@INC entries checked: //tlpkg //texmf-dist/scripts/texlive /usr/lib/perl5/5.38/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.38/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.38/core_perl /usr/share/perl5/core_perl) at /usr/bin/fmtutil line 23.
BEGIN failed--compilation aborted at /usr/bin/fmtutil line 25.
error: command failed to execute correctly
checking dependencies...
Packages (1) texlive-context-2023.66594-19
Total Removed Size: 52.81 MiB
:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing texlive-context [##################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating TeXLive filename database...
(3/3) Updating TeXLive font maps...
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
updmap [ERROR]: The following map file(s) couldn't be found:
updmap [ERROR]: dvips35.map (in builtin)
updmap [ERROR]: pdftex35.map (in builtin)
updmap [ERROR]: ps2pk35.map (in builtin)
updmap [ERROR]: Did you run mktexlsr?
You can disable non-existent map entries using the option
--syncwithtrees.
error: command failed to execute correctly
checking dependencies...
Packages (1) texlive-fontsextra-2023.66594-19
Total Removed Size: 1433.62 MiB
:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing texlive-fontsextra [##################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating TeXLive filename database...
(3/3) Updating TeXLive font maps...
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2158.
Use of uninitialized value $fn in concatenation (.) or string at /usr/bin/updmap line 2159.
updmap: open() failed: No such file or directory at /usr/bin/updmap line 2159.
updmap [ERROR]: The following map file(s) couldn't be found:
updmap [ERROR]: dvips35.map (in builtin)
updmap [ERROR]: pdftex35.map (in builtin)
updmap [ERROR]: ps2pk35.map (in builtin)
updmap [ERROR]: Did you run mktexlsr?
...
I had to run the above multiple times because the packages that were to be removed depended on each other. After a few runs texlive
packages were completely gone.
$ sudo pacman -Qs texlive*
While it did work in this case, this is not reliable since I queried using regex then grep'd again relying on another regex. Had any of the texlive
packages contained numbers in the name that method would not have worked. Is there a more concise way of purging packages that all match a single regex, using only pacman
if possible? Also can I remove them without being prompted to say yes for every package?