This question already has an answer here:
I have a Python script which generates a lot of different text outputs that require me to clear the screen quite regularly. The problem with this is that once the script is finished, I have a terminal full of junk that I no longer need. I could just clear the terminal, but I'd prefer to have a behaviour similar to what happens when you 'watch' a command.
Watch makes it's own kind of 'sub-screen', and once you kill it you're returned to the terminal with all the displayed output from your command cleared away and your previous commands shown in the terminal. I think this is much cleaner.
Is there any way to achieve this? I'm using C shell if it's relevant but I could just as easily use bash or some other shell.