Messages that are important to the user, that would be helpful in explaining what is happening and why it is happening. For example, $ juju deploy charmed-kubernetes displays each action that is happening and its status, as it is likely to take a while and the user should be informed of where the process is.
Not on a new line (overwriting the last line):
Messages that would disappear quickly and the user is likely to not mind not having a record of each action that has happened. For example, $ snap remove vlc overwrites each progress message as it is executed and upon success displays just the success message.
If the command often fails in a way that can be debugged by examining the output.
If the output often contains hints about future usage, like β(To skip this next time, use: xyz --ignore-marmosets)β
Some other reasons to prefer replacing:
If a command is often used repeatedly β because then previous invocations are more likely to be visible in the terminal without scrolling, for people to refer/compare to.
If the main purpose of the command is simply to display output in the terminal β in which case itβs better for progress feedback not to remain behind to distract from it.