Do you need to learn or know how to clear the Terminal or Bash history on macOS? I notice that it tracks what was entered previously by myself or those sharing the system so when I am done in the Terminal, I enter the following.
rm ~/.bash_history; history -c
It is two lines of code that is separated by a semicolon to make it simple to execute.
By using rm ~/.bash_history, it temporarily removes or deletes ~/.bash_history. Once you start to use the Terminal, it is recreated and produces an output when history is executed. To make sure no one knows you executed the remove command, you execute history -c as it clears the history for the current shell.
If you are using an account that is placed in the automatic login field and is not given the password, you should know that sudo is not required.