Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a software programmer and I almost never reset or shut down my Apple computer.

Over time, I open a lot of windows, and I don't close them, because I am focused on doing other things.

I was wondering if there is an application that will automatically close unused applications for me, but will keep the active applications running?

I'm not afraid to lose data – mostly all important applications ask whether I want to save before they are closed.

I need this because I end up with a severely cluttered desktop and with lots of windows and applications open, that also slow down my computer in addition to being an annoyance.

share|improve this question
What version of OS X are you using? – slhck Nov 6 '12 at 10:24
I am using OS X 10.8.2. – Andrey T Nov 6 '12 at 10:26
OS X actually does this for some apps without documents open – it's called Automatic Termination. How do you define "unused" and "active"? – slhck Nov 6 '12 at 10:32
Unused: applications that weren't in-focus for extended period of time and didn't receive mouse or keyboard input. Active: applications that were in focus and/or received mouse or keyboard input. – Andrey T Nov 6 '12 at 10:35
Also, I am speaking only about applications that create window, not background running applications. – Andrey T Nov 6 '12 at 10:36

Not really a "User" answer, but as you described yourself as a programmer:

It seems like it should be straight forward to write a very simple AppleScript (or more generally OSAScript, which supports a variety of languages such as Python and JavaScript) that polls the active application and does a Tell Application X to Quit for any it hasn't seen in a while.

This has the benefit of being roughly equivalent to an interactive Cmd-Q so the application will attempt to exit cleanly in its normal manner.

share|improve this answer

To disable Automatic Termination in Mac OS X launch Terminal and enter the following defaults write command:

defaults write -g NSDisableAutomaticTermination -bool yes

Relaunch apps that use auto-termination for changes to take effect.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.