Loading…
On a Mac, closing the last window usually leaves the app running, holding memory, filling Cmd-Tab, dot still lit under the dock. QuitOnClose quits it properly, for the apps you choose, and works out which ones those are.
Downloading in a browser? macOS quarantines the file, so right-click the app and choose Open the first time. The one-line install below avoids that entirely.
You close the last window.
The app is still running. Still in memory, still in Cmd-Tab, dot still lit.
You close the last window.
The app quits, the way you expected. Nothing left behind.
It is not a bug. macOS keeps apps alive without windows on purpose, and gives you no switch to say “not this one”.
Preview, TextEdit, System Settings, that PDF from Tuesday. You closed every one of their windows and every one is still there, so finding the app you actually want takes three tries.
An app with no windows still holds its memory. A dozen of them sitting idle is a few gigabytes you never got back, on a machine you cannot upgrade.
Cmd-Q, Cmd-Q, Cmd-Q down the dock every couple of hours. It is a chore your Mac invented for you, and closing a window is the moment you already meant "I am done with this".
QuitOnClose watches every running app and adds up how long each one spends alive with no window open. An app that already quits itself never accumulates any, so it never gets suggested. The ones that linger become a Recommended group you can turn on in a single click.
Apps that keep doing real work without a window are held back and labelled with the reason (Spotify keeps playing, Docker runs containers, a VPN holds the tunnel up), so you never switch off something you rely on.
Tick every app that should quit when its last window closes.
The menu stays open, so tick as many as you like.
One menu, every running app. Ticking one does not close the menu, so a whole batch takes one visit.
Twice a second, through macOS’s Accessibility API. Minimised windows and windows on another Space still count, so neither is mistaken for "nothing open".
The same graceful quit as Cmd-Q, so an app with unsaved work still gets to ask you first. Nothing is force-killed.
Paste this into Terminal. It downloads the app, puts it in Applications and opens it. No Xcode, no account, nothing to sign up for.
curl -fsSL https://github.com/robertiuoras/quitonclose/releases/latest/download/QuitOnClose.zip -o /tmp/qoc.zip && ditto -xk /tmp/qoc.zip /Applications && xattr -dr com.apple.quarantine /Applications/QuitOnClose.app && open /Applications/QuitOnClose.appThen grant one permission. Open System Settings → Privacy & Security → Accessibility and switch QuitOnClose on. Until you do, it can see nothing and quits nothing.
Prefer to build it yourself? git clone the repo and run ./build.sh --install. Same result, and the whole program is one readable Swift file.
No. It sends the same graceful quit as Cmd-Q, so an app with unsaved changes shows its usual "do you want to save?" dialog and stays open until you answer.
Counting an app’s windows is what that permission covers on macOS. Without it QuitOnClose can see nothing and quits nothing, so it is the whole mechanism rather than an optional extra. It reads window counts only: no keystrokes, no screen contents.
The build is ad-hoc signed rather than notarized. A browser marks what it downloads as quarantined, and macOS refuses to open an unsigned app carrying that mark, so the first launch needs a right-click then Open. The one-line install sidesteps it: curl does not set the quarantine mark in the first place, and the command clears it anyway. You can also clone the repo and build it yourself; the source is short enough to read in one sitting.
Anything that does real work without a window: music, downloads, file sync, VPNs, containers, chat apps you take calls in. QuitOnClose lists these separately with the reason and never recommends them. Finder, Dock and Control Center can never be ticked at all.
Same job, no price and open source. Universal binary for Apple Silicon and Intel, macOS 13 Ventura or later.
Free, open source, and small enough to read before you trust it.