4

I am unable to pin MacTeX in Terminal with the command brew pin mactex:

enter image description here

It would ordinarily be not a problem. However when I try to upgrade formulas using brew upgrade or brew upgrade --cask it tries to upgrade MacTeX also, which I do not want. Any help is appreciated.

1
  • 2
    When adding Terminal output, please copy/paste as text and format as code, it's much easier to read that way (and also accessible to people using screen readers).
    – nohillside
    Commented Jun 5, 2022 at 8:15

2 Answers 2

3

MacTeX is installed as a Homebrew cask, casks can't be pinned though (see https://github.com/Homebrew/homebrew-cask/issues/49127#issuecomment-401501245 and https://github.com/Homebrew/homebrew-cask/issues/90242)

A huge chunk of casks auto-update and we can’t stop that. So pin would at best be inconsistent and not work in a lot of cases.

There is a user-written extension called homebrew-cask-upgrade which seems to address this issue, but I have no experience with it and it may bring along other issues.

For your specific scenario, I would just install MacTeX directly from TUG and avoid any auto-updating triggered by Homebrew. Or, if you don't need the GUI applications bundled with MacTeX, use brew install texlive which just installs the non-GUI binaries and can be pinned.

4
  • 1
    Is it really MacTeX that is installed by Homebrew or TeX Live? Commented Jun 5, 2022 at 13:55
  • 2
    @HerbSchulz See first few lines of the respective cask. MacTeX is TeX Live with macOS GUI components. But there is brew install texlive which doesn't include the GUI parts.
    – nohillside
    Commented Jun 5, 2022 at 13:58
  • 2
    MacTeX also installs a data structure that running apps in Terminal easy and standardizes GUI setup. Commented Jun 5, 2022 at 20:22
  • Thank you @nohillside and HerbSchulz. In the future I will be switching to Linux and I hope with the new experience will come new niggles and issues. Hehe. For the present I am only upgrading the formulae that needs to be upgraded by name.
    – banuyayi
    Commented Aug 15, 2022 at 9:03
-1

I posted another workaround.

You can simply remove the cask file. Keep in mind that this will break all other operations with this cask.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .