Skip to content

Instantly share code, notes, and snippets.

@fscm
Last active April 29, 2025 16:56
Show Gist options
  • Select an option

  • Save fscm/f15e9ee122dc3d33d1775eae4311f2f1 to your computer and use it in GitHub Desktop.

Select an option

Save fscm/f15e9ee122dc3d33d1775eae4311f2f1 to your computer and use it in GitHub Desktop.
[macOS] Install BasicTeX

[macOS] Install BasicTeX

Instructions on how to install the BasicTeX TeX distribution on macOS.

Uninstall

First step should be to unsinstall any previous BasicTeX installation. This step can be skipped if no BasicTeX version was previously installed.

To uninstall any previous BasicTeX installations use the following command(s):

sudo rm -rf /usr/local/texlive /Library/TeX

Install

The BasicTeX TeX distribution can be obtained here. Copy the link for the package version that you want to install from there.

Get the BasicTeX installer package using the following commands:

mkdir ~/Downloads/BasicTeX
curl --silent --location --retry 3 "https://mirror.ctan.org/systems/mac/mactex/BasicTeX.pkg" --output ~/Downloads/BasicTeX/BasicTeX.pkg

Run the installer package using the following command:

sudo installer -pkg ~/Downloads/BasicTeX/BasicTeX.pkg -target /

Verify

Open a new terminal window and check if the CMake tool is installed:

tex --version

Clean up

After installing the BasicTeX TeX distribution you can remove the downloaded installation package using the following command:

rm -rf ~/Downloads/BasicTeX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment