How to Disable Lion’s Resume Feature for Terminal

Question:

Joe writes: I finally upgraded to OS X Lion, but now when I launch the Terminal application the contents of my previous Terminal session as well as my Terminal command history are present in the window. Is there a way to stop this behavior so that each Terminal session starts fresh?

Answer:

The behavior you’re witnessing is caused by Lion’s “Resume” feature. While it can be helpful in many cases, some users have found it to be an annoyance, as you did with Terminal. Thankfully, “Resume” can be disabled on a per-application basis.

To restore Terminal to its previous behavior, enter this command: 

defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false

Now, you’ll need to quit and relaunch Terminal twice to make the change permanent. The reason being that you’re making the change from within the target application. So, issue the command, quit, relaunch, quit again, and then relaunch to see the results. 

For more information on Lion’s “Resume” and instructions on disabling the feature for other programs, or system-wide, see Melissa Holt’s TMO Quick Tip.