[Tex/LaTex] How to uninstall TeX Live on Mac which is installed through command “sudo port install texlive +full”

auctexemacsinstallingmacptex

At the beginning, my purpose is to set up AUCTeX with Emacs. I just do like below

  1. Download AUCTeX, then cd to the directory, make and sudo make install.
  2. It works well when the .tex file only contains english characters. But when I create a .tex with Japanese characters and enter command C-c C-c. It will prompt error message

LaTeX Error: This file needs format 'pLaTeX2e' but this is 'LaTeX2e'

I search on google and find It is because LaTex2e don't support Japanese characters. I should install pLaTeX2e as well. At last I found command

$ sudo port install texlive +full

on the site http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Mac#f8cc2ba3.
It is really a horrible command; it uses almost 7GB storage but the issue is still not resolved.

Anyone who has any suggestion to delete this file completely or resolve this error issue?

Best Answer

Here's an answer based on the comments.

As others have noted, this problem isn't really about Emacs or AucTeX, but about your TeX Distribution. And here, the problem is MacPorts. The de facto standard Mac distribution is the MacTeX distribution. You should generally avoid other types of package manager versions of TeX Live. See Adding a CTAN package to a MacPorts-maintained TeX installation for some discussion of why.

To remove a MacPorts port, you need to use

sudo port uninstall --follow-dependents <portname>

So use this to uninstall the TeX port you added.

Then do a fresh install of MacTeX.

This will set your TeX binary directory to /usr/texbin.

For a MacOS version of emacs see: this link, or use Aquamacs.