Close All Windows in a Mac App with a Keystroke

Jul 2, 2014 - 8 Comments

finder-icon Most Mac users know that hitting the Command+W keyboard shortcut will close the currently active window, but with a slight modification and by adding an additional key press, you can close all windows in just about any OS X app or the Mac Finder. What’s this super excellent keyboard shortcut for closing everything? It’s easy to remember, just add Option to the traditional close shortcut making it this: Command+Option+W


Close All Windows in Mac OS X with a Keystroke

Hitting Command+Option+W will close all windows in the currently active Mac application, or the Finder of OS X.

Not into keyboard shortcuts? You can also access the “Close All Windows” option from File menu options in either the Finder or just about any Mac application, but it’s invisible by default until you hold down the “Option” key when choosing the File menu. This transforms “Close” into “Close All” as shown in this screen shot:

Close All Windows on Mac with a Shortcut

The short video below demonstrates this trick as well:

The windows close rapidly, if you want to quickly try this out yourself an easy place to start is in the OS X Finder. Just open a bunch of new Finder windows (by hitting Command+N in modern versions of Mac OS X a bunch) and then hit Command+Option+W to close them all out. Or you can try it in another app by opening a bunch of documents in something like TextEdit or Preview and closing those all out together too. Close All is best used in applications when auto-save is left enabled, otherwise the window closing process will halt as a save dialog box is summoned and waiting for an action. If you happened to turn off auto-save in OS X at some point, just turn it back on to get uninterrupted use out of this keystroke.

Note how this is very different from closing windows on quit, which closes all the windows when the application is quitting, thereby preventing the auto-restore function of OS X from relaunching those windows. This trick closes the active windows, but does not quit the app or discard the windows from restore.

The Command+W keystroke for closing a single window has been around on the Mac since the earliest days of the operating system, and the Option modifier has been around for ages as well, but despite that, few Mac users seem to be aware of it. Learn this trick, you’ll surely use it often.

Enjoy this keystroke? There are even more, don’t forget to learn and master the 7 window management keyboard shortcuts for Mac

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks

8 Comments

» Comments RSS Feed

  1. MarkB says:

    surely command + q will also close ‘ALL’ windows too

    • Dom says:

      No, They don’t close window they will quit the running application. But windows will be resumed again to same place as before.

  2. scott says:

    semi-related: hide every open window of *every app* by Option-Command-Clicking somewhere on the Desktop.

    Two caveats: you have to be in some app before clicking on the Desktop (versus being in the Finder and trying it), and true, it doesn’t close the windows; just hides ‘em.

    Still, it’s a brilliant quick way to clear the decks.

  3. The excellent Show Desktop lives in the menu bar; when clicked, all windows of all apps are hidden, not closed, taking the user to the Finder, with an option to open a Finder window, or not.

  4. It’s interesting how few people know about these key strokes. I started out on the Mac learning to use key strokes instead of always using the Mac. I was happy to see that key strokes for hiding and minimizing came over from NeXTStep.

  5. Schwarzmaler says:

    One of the plus aspects in OS X is how consistent these key strokes are implemented. On other platforms I never really got into using them much cause every application, sometimes every release came with a different short cut for the same task. Only with the Mac I started to learn and use more than a handful commands.

  6. DCJ001 says:

    Keep in mind, too, that, if multiple tabs are open in Safari, and, if Command-Option-W is pressed, the File menu option for this will say “Close Other Tabs,” and all of the Safari tabs that are open, except for the one that is currently active, will close.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates