Terminal retains a log of a session. This allows you to scroll back through every line in the session. Over time the amount of information may become larger than needed, making it difficult for the user to scroll back through the content.
You can change the number of rows retained in Terminal preferences.
Choose Terminal > Preferences, and then click Settings.
Click Window.
Select a setting to modify from the Settings list, located on the left side of the Settings pane.
In the Scrollback section, select “Limit number of rows to” and enter the number of rows you want retained.