term-buffer-maximum-size
term-buffer-maximum-size is a variable defined in `term.el
'.Its value is
2048
Documentation:
The maximum size in lines for term buffers.
Term buffers are truncated from the top to be no greater than this number.
Notice that a setting of 0 means "don't truncate anything". This variable
is buffer-local.
You can customize this variable.