If I open up terminal with ⌘Space terminal and hit ⌘n a bunch of times, I get many terminals.

I can get rid of all of them using killall Terminal, which sends the signal TERM by default.

However, when I open the terminal application again, all of the previous sessions are restored instead of creating a fresh session.

Is there a signal I can use to kill terminal applications in such a way that they aren't restored when I launch the terminal application again the same way that ⌘Q works?


I'm no Terminal guru, however it appears to respond in the same way as any other app.

If you quit it, then at next launch it will restore all previously open windows.
This is a global pref, set from System Prefs > General > Close windows when quitting an app.

If you don't want to change this pref globally, then the simplest solution would be to close the windows manually before Quit.

Cmd ⌘ Opt ⌥ W is the system-wide shortcut to do that.

As far as I'm aware, killall Terminal is the same as Cmd ⌘ Q in that respect, i.e. a 'polite' quit command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .