MacOS – How to enable/disable OS X beta participation from Terminal

beta-seed-programmacosterminal

Does anyone know how to enable/disable OS X beta participation from the Terminal?

Typically one could opt-out of the Beta program by choosing the following option found in the App Store preferences pane. However once you opt out, the option to opt-in disappears and one has to use a utility found online to opt in again. This is tedious for me. Since most settings in OS X are managed using defaults, I wonder if anyone has a set of commands to enable/disable this option in the preference pane?

If not then perhaps a process where I can discover the relevant defaults read/write statements to enable this feature?

Ultimately, I would like to simply be able to opt-in during certain periods and opt-out during other times.

If there is a simpler approach than using the Terminal, I am open to learning about that as well.

beta

Nota Bene – Please let me know in the comments if anything is unclear
or if more information is necessary to improve this question.

System:
I am running Yosemite and El Capitan on different machines.

Best Answer

As mentioned by SeanCLT, you/your system needs to be enrolled in one of the programs and you need to have the right utilities installed The statement about the utilities is an assumption, I have not tried it without. After that you can use the softwareupdate command to enable and disable the beta/pre-release source.

You can disable it via:

softwareupdate --clear-catalog

Enabling is a bit more tricky, because you need to choose your channel/source. The options are:

OS X Public Beta

sudo softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12beta-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz

OS X Developer Beta catalog

sudo softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12seed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz

OS X Gold Master catalog

sudo softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz