From here.
In Ubuntu terminal, we can use the “clear” command or the “Ctrl + L” keyboard shortcut to clear the screen. However this just push the existing output upwards which means you can still see it if you scroll the terminal screen. To really clear it, you can use the “reset” command.
In contrast to “clear”, or “Ctrl + L”, “reset” will actually completely re-initialise the terminal, instead of just clearing the screen. However, it won’t re-instantiate the shell (bash). That means that bash’s state is the same as before, just as if you were merely clearing the screen.
The “reset” command is also working on the terminal of Mac OS. And the equivalents of “clear” and “Ctrl + L” on Mac OS are “clear” and “Cmd + R”.