You cannot retroactively increase the length of the scroll buffer in the current session to restore old lines that have already been discarded. However, if you change the current setting for the scrollback parameter ( Ca :scrollback <number> ), it will add more space for future terminal output. You can also set the defscrollback parameter to change the initial scrollback setting for new windows.
If you want to set the default value for all windows of all new screen sessions, create a ~/.screenrc file with
defscrollback 50000
or, if you sometimes want a big scroll, put it in a separate file, for example ~/screenrc-50k-scrollback and call screen as follows:
screen -S <screen_name> -c ~/screenrc-50k-scrollback
Check the current scroll throughput with Ca i ( info command).
(22,1)/(25,40)+50000 +flow G0[BBBB] 0(bash) ^^^^^
Link: GNU Screen Guide Scroll Section
source share