Recommendation: Use the terminal control codes 1049h and 1049l [1][2] to keep the terminal 'clean'.
[1]: https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Seque...
[2]: https://unix.stackexchange.com/a/789031