Do you need to learn or know how to clear the Terminal or Bash history on macOS? All it takes is two lines of code which makes it simple to execute.
rm ~/.bash_history; history -c(May not work in macOS Catalina using zsh)
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.