Limit what Terminal remembers—and stop old windows reopening on your Mac

By the Zofle team · 11 November 2026 · 2 min read

Terminal window with rows of retained output and a row-limit message

Terminal can retain a long live scrollback and can restore text when a window reopens. They have separate controls. This is mainly about privacy, speed and calmer sessions—not a typical multi-gigabyte cleanup target.

Set both row limits

  1. Open Terminal > Settings > Profiles.
  2. Select the profile you actually use, then open Window.
  3. Under Scrollback, turn on Limit number of rows to and enter your chosen count.
  4. Under Resume, keep or clear Restore text when reopening windows.
  5. If restore stays on, also set Limit number of restored rows to.

A value such as 10,000 rows is only an example you choose, not an Apple recommendation and not a byte estimate. Row width, Unicode and command output all change the memory and storage involved.

Forget the previous windows once

Hold Shift while opening Terminal. Apple says this makes the app forget the windows that were open when it last quit, without changing the global setting. At logout or restart, clear Reopen windows when logging back in if you do not want the whole session restored.

The global switch overrides Terminal

System Settings > Desktop & Dock > Windows > Close windows when quitting an application prevents saved windows from reopening and overrides Terminal's restore choices. Do not manually delete ~/Library/Saved Application State or Terminal databases; the settings preserve the behavior you actually want.

For genuinely large development leftovers, Homebrew's Cellar, Caskroom and cache are usually more useful to measure than Terminal text.

Zofle points you toward storage that is actually large, while Terminal's own settings control what it remembers.

Download Zofle for Mac

Sources

Zofle Pro news

People signing up now will get Zofle Pro, with more features, for free when we launch it.

One email when it's ready. No spam, ever.