Many Mac apps have a Close All, but it's easy to miss: it hides behind the ⌥ key, in the keyboard shortcut and in the File menu. Here's where to find it, what happens to your documents, and how closing everything differs from quitting.
⌥⌘W
| Keys | What it does |
|---|---|
| ⌘W | Closes the front window. |
| ⌥⌘W | Closes all of the front app's windows. |
| ⌘Q | Quits the app, which closes its windows too. |
⌥⌘W acts on the app you're in, so switch to it first with ⌘Tab. Documents in the windows it closes are handled the same as when you close them one by one. Apple's Desktop & Dock settings put it this way: by default, unsaved changes are automatically saved when you close documents. If you'd rather be asked, turn on Ask to keep changes when closing documents in System Settings › Desktop & Dock › Windows. Apps that don't save automatically ask before closing a window with unsaved changes.
In apps with tabs, ⌘W usually closes a tab rather than the window; Apple lists ⌘W in Safari as closing the active tab. In those apps ⌥⌘W can mean something else, so check the File menu, below, before you rely on it.
The File menu
Open the File menu and press ⌥: in many apps, Close or Close Window changes to Close All, with ⌥⌘W beside it. Finder's File menu, for example, shows Close Window ⌘W and, with ⌥ held, Close All ⌥⌘W. The menu shows what ⌥⌘W does in that app before you press it, which is worth a look in browsers and other apps with tabs.
Finder windows
Press ⌥⌘W in Finder to close every Finder window, tabs included. Finder itself keeps running: Apple notes that the Finder is always open, and its menu has no Quit command. A few habits keep the windows from piling up again:
- ⌥-double-click a folder to open it in a separate window and close the one you came from.
- ⌘-double-click a folder to open it in a new tab or window, depending on your Finder settings.
- Window › Merge All Windows turns all your Finder windows into one window with tabs.
To close Finder windows from Flick, including minimized ones and those on other desktops, see Flick and Finder; for windows with tabs, ⌥⌘W in Finder is the one to use.
Close all or quit?
Closing all of an app's windows usually doesn't quit it. Apple's guide puts it plainly: the app remains open, which the small dot below its icon in the Dock shows. Each app decides for itself, though, and a few built around a single window, such as System Settings, quit with their last window. Keeping the app open is often what you want: Mail keeps checking for messages, Music keeps playing, and the app opens a new window straight away the next time you need it.
Press ⌘Q when you're done with the app itself. It closes the windows and ends the app, and an app quitting normally gets the chance to save your changes first. Quit vs close explains why most Mac apps keep running without windows, and when quitting is worth it. If you only want the windows out of sight for now, minimizing or hiding is quicker to undo; see minimize vs hide.
Apps that reopen their windows
If an app has windows open when you quit it, macOS shows them again the next time you open the app. So for apps that work this way, the order matters: ⌥⌘W and then ⌘Q gives you a clean start next time, while ⌘Q on its own brings everything back. To change this:
- For every app: turn on Close windows when quitting an application in System Settings › Desktop & Dock › Windows.
- Just once: hold ⇧ while you open the app. Apple says this changes no settings, but the app forgets the windows it had open.
- At login: deselect Reopen windows when logging back in in the dialog that appears when you shut down, restart or log out.
- In the app itself: some apps have their own setting; Safari, for example, lets you choose which windows it opens with.
With Flick
Flick, a window switcher, puts Close All in its actions menu, for any app in its list. Select one of the app's windows, press ⌥⇧K (⇧⌘K with the ⌘Tab trigger) or right-click the row, and choose Close All Windows of App; in a menu you opened from the keyboard, A does the same. Flick closes every window of that app it knows about, on every Space, minimized ones included. It presses each window's close button, so a document with unsaved changes can still ask to be saved, and you don't have to switch to the app first. In a window with macOS tabs, as in Finder, Terminal or Preview, it closes the tab in front and leaves the others, so for those windows, the app's own Close All, such as ⌥⌘W in Finder, is the one to use.
To close just the selected window, press ⌥⇧W while you hold ⌥, or ⌘W with the ⌘Tab trigger. Flick stays open after either one and the list updates, so you can tidy up several apps in a row. The actions menu is in the free version too. Every action and key is in the actions menu help.
Sources
Checked on , for macOS 14, 15, 26 and 27.
- Mac keyboard shortcuts (⌘W, ⌥⌘W, ⌘Q, and ⌥- and ⌘-double-clicking in Finder), Apple Support
- Move and arrange app windows on Mac (closing one or all windows; Merge All Windows), Mac User Guide, Apple
- Quit apps on Mac (windows shown again after quitting), Mac User Guide, Apple
- Change Desktop & Dock settings on Mac (Ask to keep changes when closing documents; Close windows when quitting an application), Mac User Guide, Apple
- Prevent apps and windows from reopening on Mac, Apple Support
- How to force an app to quit on Mac (quitting normally; the Finder is always open), Apple Support
- Keyboard shortcuts and gestures in Safari on Mac (⌘W closes the active tab), Safari User Guide, Apple
- applicationShouldTerminateAfterLastWindowClosed(_:) (each app decides whether to quit with its last window), AppKit documentation, Apple Developer