Is there a way to ensure less clears screen on exit?  The opposite of less -X.  The screen is not being cleared when I exit a man page in iTerm2, however the screen is cleared when using the default mac terminal.  Does anyone have suggestions?$LESS is set to less -R
Ensure less clears screen
osx;man;less;iterm
Normally less clears the screen (which probably refers to switching back to the normal screen from the alternate screen) when the terminal description has the appropriate escape sequence in the rmcup capability.You would see a difference if you are using different values of TERM in the two programs.  The infocmp program can show differences for the corresponding terminal descriptions.less also attempts to clear the remainder of the screen, but that depends upon whether anything was displayed, and if the output was a terminal (in contrast to a pipe).Aside from the terminal description, some terminal emulators make it optional whether to allow the alternate screen. You may have selected that option at some point. (I'm testing with default configuration, which works as intended). 