How-To: Quit All Open Applications in OS X


Sometimes, for whatever reason, you need to quit all your open applications. But going through each application and quitting them is a pain. Good thing Apple included a nifty little scripting language in OS X called AppleScript that will allow us to quit applications in one fell swoop.

The Easy Way

  1. Just download the precompiled Quit application we put together.
  2. You’re done, unless you want to assign it to a keyboard shortcut, in which case, read the Assigning a Keyboard Shortcut section below.

The Hard Way

  1. Fire up the AppleScript Editor, which is located in /Applications/Utilities.
  2. Copy this code and paste it into the AppleScript Editor window:
    tell application "System Events" to set the visible of every process to true
    set white_list to {"Finder"}
    tell application "Finder"
    set process_list to the name of every process whose visible is true
    end tell
    repeat with i from 1 to (number of items in process_list)
    set this_process to item i of the process_list
    if this_process is not in white_list then
    tell application this_process
    end tell
    end if
    end repeat
    on error
    tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0
    end try
  3. Save it as an application and give it a name (may I suggest “Quit”?).
  4. That’s it. You can move it to your desktop so you can run it before you shut down, but that’s inefficient, isn’t it? Read on to find out how to assign it to a keyboard shortcut.

Assigning a Keyboard Shortcut

  1. Open up Automator (/Applications/Utilities) and choose to create a new service.
  2. Set Service receives to no input and leave everything else alone.
  3. Search for launch application in the search field on the left pane and drag the resulting action over to the right pane. Your Automator window should look like this:
  4. Save it and give it a name. I used Foo.
  5. Open up System Preferences and click on Keyboard (or Keyboard & Mouse, depending on your version of OS X).
  6. Go to the Keyboard Shortcuts tab and click on Application Shortcuts in the left pane.
  7. Click the + symbol to add a new shortcut and make sure the Application popup list is on All Applications.
  8. Put whatever name you gave the service you created earlier in the Menu Title field. It has to be the exact name, meaning capitalization matters.
  9. Click on the Keyboard Shortcut field and enter whatever shortcut you want. Shift-Command-Q is already taken by the system, so I used Option-Command-Q. Your window should look like this:
  10. Click Add, and you’re done.


Now you’re ready to take over the world. Well, maybe not, but you are ready to shut down.

You're subscribed! If you like, you can update your settings


Comments have been disabled for this post