"Excluded Application list"?


Where is that "excluded application list" please? I search the docs and couldn't find a proper mention.

No mentions on the forum either.



I’m trying to create a macro that quits all applications except the ones on a list.

Hi Leo

I think it’s the list in the preferences.

\ Jimmy Hartington

Hey Leo,

Discourse supports screenshots. All you have to do is drag one into the editor - or you can paste a link from the net to show a linked image.

Keyboard Maestro's excluded apps list is not a good mechanism for what you're doing.

For this job an Execute AppleScript Action is probably best.

set myDoNotQuitList to {"TextEdit", "BBEdit", "Keyboard Maestro"}

tell application "System Events"
  set quit delay to 0
  set appList to name of processes whose background only is false
end tell

repeat with i in appList
  if i is in myDoNotQuitList then set contents of i to 0
end repeat

set appList to text of appList

repeat with i in appList
  tell application i to quit
end repeat

Note that apps with unsaved data may ask you to save it depending upon your system settings.

Best Regards,


Thanks Jimmy, thanks Chris. Sorry I forgot to check the forums for this issue.

Yes Chris the applescript works just fine!

@ccstone, I am attempting to use the AppleScript code snip you posted. (Thanks for that.) But I am running into some problems.

  1. The script doesn’t seem to reliably quit all apps. I find that occasionally 2-3 apps are still running after the script finishes.

  2. It seems that I don’t have to specifically exclude background apps (e.g., Dropbox, Hazel, Alfred, etc.). It appears that those continue to run. Is that the expected behavior?

Finally, I attempted to adjust delay to 1, but that didn’t seem to help. Also, the apps that won’t quit are fairly random. As far as I can tell they do not have unsaved data or are not synching.

Any ideas? Thanks, Chris.

Hey Michael,

I'm just catching up after traveling over the holidays.

Let's see if we can solve them.

Specify exactly what apps are failing to quit.

Please also provide the list of processes this script produces – in particular the names of the process that correspond to the ones that aren't quitting.

set AppleScript's text item delimiters to linefeed
tell application "System Events" to set appList to (name of processes) as text

Yes – see this line:

set appList to name of processes whose background only is false

That can be changed of course.

That's a setting for System Events and has nothing to do with quitting the apps...

As I mentioned above I want to know exactly what apps are failing to quit.

Sometimes the displayed names of apps and their process names are not the same, and there are a few other possible pitfalls.

Also – what version of the macOS are you using?


1 Like