How to Stop macOS from Automatically Closing Apps

The Silent Termination

macOS includes a deeply embedded power and memory management feature known as “Automatic Termination” (sometimes loosely associated with App Nap). To conserve system RAM and prolong battery life on MacBooks, the operating system is designed to quietly quit applications that are running in the background if they haven’t been actively used in a while and have no visible open windows. While this keeps the system running smoothly, it is highly problematic if you rely on a background utility that must remain open, or if you prefer to keep heavy applications (like Adobe Photoshop) loaded in memory so they launch instantly when you click their dock icon later, rather than waiting for a full cold boot.

Disabling Automatic Termination

To ensure your applications stay running exactly as you left them and stop macOS from automatically closing inactive apps to save memory, you must change a global system default via the terminal.

Apple does not provide a simple graphical toggle for this core behavior. You must use the Terminal application. Open Terminal (found in Applications > Utilities, or by searching with Spotlight). To turn off the automatic termination feature for the entire operating system, type the following command exactly: defaults write -g NSDisableAutomaticTermination -bool yes and press Enter. The change is instant, though you may need to restart currently running applications for them to register the new policy. From now on, when you close the last window of an application, the app will stubbornly remain active in your Dock (indicated by the small dot underneath its icon) and will continue consuming RAM until you explicitly right-click it and choose Quit (or press Cmd+Q).

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.