There are many questions and commentary about using
launchctl setenv PATH /path/to/include in order to have GUI apps inherit user-specified paths. I did this about four years ago, and the changes I added have persisted to 10.11.6 (current OS). Unfortunately for me, I have long forgotten these settings until recently...
None of the man pages or commentary indicates how to revert these changes to factory defaults. For instance, running
launchctl getenv PATH yields:
launchctl setenv PATH [blank] is evidently an error, demanding a non-blank value. I'm also hesitant to experiment with this much because I don't know whether there is a macOS default setting for this key-value pair.
Can someone please tell me how I can flush the current contents of
launchctl getenv PATH or to return its content to what would appear in a fresh install? I would rather not replace what's currently there with the default paths from
/etc/profile and the like, unless those are the self-same values that appear when running
launchctl getenv PATH on a fresh installation.
launchctl unsetenv PATH did clear out the variable, but it did not persist after reboot - i.e., the same path values returned after a restart.