All articles

How to close all windows on a Mac: every shortcut that works

Your screen is buried. Six Finder windows, four browser windows, a handful of documents you opened last Tuesday, and somewhere underneath, the thing you actually meant to work on. The instinct is to close all windows on your Mac and start clean — but macOS handles this less directly than you'd expect. There's a great shortcut for one app, no single shortcut for everything, and a few gentler moves that get you a clear screen without losing your place. Here's the whole picture.

The one shortcut to know: Option-Command-W

W closes every window of the app you're currently in. One keystroke, no menus, no dragging.

It works because it's the same File → Close menu item you already know, with a hidden variant: open the File menu and hold , and "Close Window" turns into Close All. Nearly every well-behaved Mac app supports it, Finder included — W in Finder sweeps away all your open Finder windows at once.

If your hand is already on the mouse, the equivalent is holding while clicking the red close button in any window's title bar.

One catch worth knowing: closing an app's windows does not quit the app. It keeps running, using memory, with a dot under its Dock icon. For some apps that's fine; if you want it gone, you want Q.

Close, quit, hide, minimize — four different things

These get used interchangeably in conversation, and they behave very differently. Picking the right one is most of the battle.

ActionShortcutWhat happensComes back with
Close windowWCloses the front window or tab; app keeps runningReopen it manually
Close all windowsWCloses every window of the front appReopen manually
Quit appQCloses windows and exits the appRelaunch; windows may restore
Hide appHWindows vanish; app stays running and ready
Hide all othersHEverything except the front app disappears
Minimize windowMFront window shrinks into the DockClick it in the Dock
Minimize allMEvery window of the front app goes to the DockClick each in the Dock

The most underused row here is Hide. Minimizing sends windows to the Dock, where can't easily retrieve them — you end up clicking. Hiding gets the same visual result and the app snaps back the instant you switch to it. If you're clearing the screen to concentrate rather than to finish with something, hide, don't minimize.

In browsers there's one more wrinkle: W closes the current tab, not the window. To close the whole browser window, tabs and all, use W in Safari and Chrome.

How to close all windows across every app

The honest answer: macOS has no single shortcut for this. W is per-app, and Apple never built a system-wide equivalent. What you have instead:

  • The Cmd-Tab sweep. Hold and press to bring up the app switcher, then — still holding — press Q to quit whatever is highlighted. Keep holding, tab along, press Q again. You can clear a full screen of apps in a couple of seconds without ever switching to them.
  • Log out. Q logs you out, which quits everything on the way. Add Q — to skip the confirmation dialog. Blunt, but genuinely a clean slate.
  • A "quit everything" script. Automator has a Quit All Applications action; save a workflow using it as an application and you get a one-click Dock button. It's the classic approach, though apps with unsaved changes will still interrupt to ask.
  • Force quit, for anything stuck: esc opens the Force Quit window. Use it for frozen apps only — it discards unsaved work.

Stop windows from coming straight back

Quit an app, relaunch it, and macOS helpfully restores every window you just closed. If that's the opposite of what you want, turn it off: open System Settings → Desktop & Dock, scroll down, and switch on Close windows when quitting an application.

With it on, apps reopen empty — a new document, an open dialog, a fresh window — instead of resurrecting last week's pile.

The gentler options

Closing everything is a blunt instrument. Three moves clear your screen without destroying anything:

  • Show Desktop. fnH (also + Mission Control key, or fnF11) pushes every window aside for a look at the desktop. Press it again and everything comes back exactly as it was.
  • Merge All Windows. In Finder, Safari, Mail and most tabbed apps, Window → Merge All Windows collapses a sprawl of separate windows into one window full of tabs. Six Finder windows become one. Nothing is lost, and the clutter is gone.
  • Hide all others. H leaves you alone with the app in front of you. It's the fastest focus shortcut on the Mac and almost nobody uses it.

When closing everything is the wrong fix

It's worth asking why the windows piled up. If you're closing them because you couldn't find anything, closing is treating the symptom — tomorrow the pile returns.

Two habits fix the cause. First, put windows somewhere deliberate instead of letting them land wherever they open: a keyboard tiler like Let's Tile drops a grid over the screen and snaps the focused window into a cell in a few keystrokes, so a busy screen still has a shape. Second, get to the window you want directly rather than digging: only switches apps, which is why the one window you need stays buried — Let's Switch flips through your most recently used windows with , live preview and all.

When finding a window takes half a second, twenty open windows stop being a problem worth solving with W.

Frequently asked questions

Is there a shortcut to close all windows on a Mac at once? Not across every app. W closes all windows of the app you're in. For everything at once, use the Cmd-Tab quit sweep, log out with Q, or an Automator "Quit All Applications" app.

Does closing all windows quit the app? No. The app stays running with a dot under its Dock icon. Use Q to quit it properly.

How do I close all Finder windows? W with Finder in front. Or, if you'd rather keep them, Window → Merge All Windows turns them into tabs in a single window.

Why do my windows reopen when I relaunch an app? macOS restores an app's state by default. Turn on Close windows when quitting an application in System Settings → Desktop & Dock to stop it.

More keyboard-first Mac guides are on the blog.