Uninstalling MacTeX

The Apple Installer does not support uninstalling files. Hence, if you install MacTeX and then want to get rid of everything, your task may be easy or difficult depending on what you installed.

The MacTeX_Additions install package contains four pieces, which can be selected or unselected using the Custom button. The pieces are GUI Applications, Font Utilities, Ghostscript, and ImageMagick.

The GUI programs portion of the install is placed in /Applications/TeX. Uninstalling these programs is easy; just drag them to the trash. To uninstall everything, drag the entire TeX folder to the trash.

The Font Utilities, Ghostscript, and ImageMagick portions are the most difficult to uninstall because each contains files placed in various subfolders of /usr/local. For example, Ghostscript installs files in /usr/local/bin, /usr/local/man, and /usr/local/share/ghostscript. On the other hand, these packages are the least important for TeX users. Font utilties are seldom used unless you want to use Mac fonts in TeX without using XeTeX. Ghostscript can mostly be replaced by Apple's built-in distiller; the exception is the package epstopdf for converting eps files automatically to pdf format during typesetting with pdflatex. ImageMagick is used to convert tif files to png files automatically during typesetting with pdflatex. Hence a user concerned about uninstalling might decide to avoid these three packages.

Apple's installer has a menu command File/Show Files which shows the location of all files installed by the package. If you installed one of the three packages just mentioned, use this command to list installed files and remove them by hand.

The TeX distributions are much easier to uninstall. Gerben's original teTeX distribution was placed in /usr/local/teTeX, his gwTeX distribution is placed in /usr/local/gwTeX, and the TeXLive-2007 distribution is placed in /usr/local/texlive, with the majority of the distribution going to /usr/local/texlive/2007. To remove, say, TeXLive-2007, use the commands

sudo bash
rm -R /usr/local/texlive/2007

This step will automatically disconnect the TeXDist data structure, so it is not necessary to clean up this structure.

The TeXDist data structure is in /Library/TeX, but this data takes up little space. The data structure contains stubs for TeX distributions which may or may not be installed. So, for example, removing TeXLive-2006 while leaving its data stub will cause no trouble. The location /Library/TeX is used by many TeX-related programs, so removing this location is not a good idea unless you are abandoning TeX completely.

The TeX Distribution preference pane is in /Library/PreferencePanes and the following commands will remove it:

sudo bash
rm -R /Library/PreferencePanes/TeXDistPrefPane.prefPane