How to uninstall the old version of TexLive without the uninst.bat?
Siep Kroonenberg
siepo at bitmuis.nl
Sat Sep 28 20:50:49 CEST 2024
On Sat, Sep 21, 2024 at 03:56:41AM +0000, chen p wrote:
> Dear Tex-Live Member Team:
>
> I used to be a user of Tex-Live. Today, I want to uninstall the old
> version of TexLive 2021 package that I installed, but I am facing some
> issues and cannot find the uninstallation program.
>
> Would you be able to provide me with some uninstallation advice? Thank
> you very much.
>
> Sincerely,
> Your Faithful.
Try manually putting an uninst.bat and an uninst2.bat in
C:\texlive\2021\tlpkg\installer and then run uninst.bat:
uninst.bat:
-----------
rem @echo off
setlocal
path C:\texlive\2021\tlpkg\tlperl\bin;C:\texlive\2021\bin\windows;%path%
set PERL5LIB=C:\texlive\2021\tlpkg\tlperl\lib
rem Clean environment from other Perl variables
set PERL5OPT=
set PERLIO=
set PERLIO_DEBUG=
set PERLLIB=
set PERL5DB=
set PERL5DB_THREADED=
set PERL5SHELL=
set PERL_ALLOW_NON_IFS_LSP=
set PERL_DEBUG_MSTATS=
set PERL_DESTRUCT_LEVEL=
set PERL_DL_NONLAZY=
set PERL_ENCODING=
set PERL_HASH_SEED=
set PERL_HASH_SEED_DEBUG=
set PERL_ROOT=
set PERL_SIGNALS=
set PERL_UNICODE=
perl.exe "C:\texlive\2021\texmf-dist\scripts\texlive\uninstall-windows.pl" %1
if errorlevel 1 goto :eof
rem test for taskkill and try to stop exit tray menu
taskkill /? >nul 2>&1
if not errorlevel 1 1>nul 2>&1 taskkill /IM tl-tray-menu.exe /f
copy "C:\texlive\2021\tlpkg\installer\uninst2.bat" "%TEMP%"
rem pause
"%TEMP%\uninst2.bat"
uninst2.bat:
------------
rmdir /s /q "C:\texlive\2021\bin"
rmdir /s /q "C:\texlive\2021\readme-html.dir"
rmdir /s /q "C:\texlive\2021\readme-txt.dir"
if exist "C:\texlive\2021\temp" rmdir /s /q "C:\texlive\2021\temp"
rmdir /s /q "C:\texlive\2021\texmf-dist"
rmdir /s /q "C:\texlive\2021\tlpkg"
del /q "C:\texlive\2021\README.*"
del /q "C:\texlive\2021\LICENSE.*"
if exist "C:\texlive\2021\doc.html" del /q "C:\texlive\2021\doc.html"
del /q "C:\texlive\2021\index.html"
del /q "C:\texlive\2021\texmf.cnf"
del /q "C:\texlive\2021\texmfcnf.lua"
del /q "C:\texlive\2021\install-tl*.*"
del /q "C:\texlive\2021\tl-tray-menu.exe"
rem del /q "C:\texlive\2021\texlive.profile"
del /q "C:\texlive\2021\release-texlive.txt"
rmdir /s /q "C:/texlive/2021/texmf-var"
rmdir /s /q "C:/texlive/2021/texmf-config"
for %%f in ("C:\texlive\2021\*") do goto :done
for /d %%f in ("C:\texlive\2021\*") do goto :done
rd "C:\texlive\2021"
:done
@echo Done uninstalling TeXLive.
@pause
del "%0"
--
Siep Kroonenberg
More information about the tex-live
mailing list.