Mac: Any way to reduce memory usage of ‘Terminal’ app

osx

I have a fairly large number of terminals open -> exactly 9, but each one has from 4-12 tabs open. They have been open for a lengthy number of days. Now, I see on the Activity Monitor that the 'Terminal' app is using 9.38 GB of memory. I don't want to lose the history/setup of these and the rest my system, so re-booting is not an option for another week or so.

Is there any other way? Can I found out which tab is using the most memory and just close the top one or two?

Thanks for any suggestions.

Best Answer

Your Terminal app in OS/X is configured to save all the lines of the current session since it was opened as long as it has memory. You must limit the number of number of rows saved by the Terminal app.

Please goto Terminal->Preferences->Profiles, edit your active template, and where you can see Scrollback, change the radio button from "Limit to available memory" to "Limit number of rows to", and place there a reasonable number (1000 to 2000 maybe).

This setting only applies to new Window Terminal sessions, I am afraid, so you must close the current ones, and open new ones.

Related Question