How to clear the scrollback in the screen command?

This thread has the following suggestion:

In the window whose scrollback you want to delete, set the scrollback to zero, then return it to its normal value (in your case, 15000).

If you want, you can bind this to a key:

bind / eval "scrollback 0" "scrollback 15000"

You can issue the scrollback 0 command from the session as well, after typing C-a :. HTH.


  • C-a C will clear the screen, including the prompt
  • clear (command, not key combination) will clear the screen, leaving a prompt

ETA: misread the original question; these will just clear the visible text, but will not clear the buffer!