Limit the number of scrollback rows
Terminal retains a log that lets you scroll back through all content typed by a user. Over time, the amount of information grows, making it difficult to scroll back through the content.
Using Terminal preferences, you can change the number of rows retained in a session.
Choose Terminal > Preferences, then click Profiles.
In the profiles list on the left, select a profile.
In the Scrollback section, select “Limit number of rows to,” then enter the number of rows.