Zap › Guides

Quit all apps on Mac with Shortcuts or AppleScript (free)

By Elyass Jaoudat · Updated 2026-10-18

You can build a free 'quit everything' button on your Mac in about five minutes. Here are two ways: the Shortcuts app, and a short AppleScript. We also explain the limits, so you know when a ready-made app is worth it.

Option A: the Shortcuts app

  1. Open Shortcuts and click + to create a new shortcut.
  2. In the action search, type Quit All Apps and add it.
  3. Set the options: you can choose apps to leave open, and decide whether apps should ask about unsaved changes. Option names can vary slightly between macOS versions.
  4. Name the shortcut ("Zap them all", for example), then open its details to Pin in Menu Bar and/or add a keyboard shortcut.

Run it once on a Mac with nothing important open, to see exactly what it quits.

Option B: an AppleScript

Open Script Editor (in Applications → Utilities) and paste:

tell application "System Events"
    set appNames to name of every application process whose background only is false and name is not "Finder"
end tell
repeat with appName in appNames
    try
        tell application (appName as text) to quit
    end try
end repeat

This asks every regular app (the ones with a Dock icon), except Finder, to quit. It uses the normal quit command, so apps with unsaved documents still ask. The script compiles on macOS, but run it with care the first time, and save your work first.

Turn it into a clickable app

In Script Editor, choose File → Save…, set File Format to Application and save it in your Applications folder. You can drag it to the Dock.

Things to know

When a ready-made app is worth it

These methods are free and good. If you would rather have a one-click menu bar button, a list of protected apps you manage with a click, and no Automation permission to grant, that is what Zap is for. It is a paid convenience, not something you cannot do yourself.

Questions

Does the Quit All Apps shortcut ask to save documents?

It depends on the action's options. The action lets you decide how unsaved changes are handled. Check the options before relying on it, and test it with a non-important document.

Why does macOS ask for Automation permission?

An AppleScript that talks to System Events needs your permission to control it. You grant it once in System Settings → Privacy & Security → Automation.

Can I keep my music app running?

Yes. In Shortcuts, choose the apps to leave open. In AppleScript, exclude them by name in the condition.

More guides