history command in macOS Catalina
Just do a
rm ~/.zsh_history
that clears the history. After that close the Terminal app. To check if the history was cleared run
history
in Terminal.
- Close all terminal tabs and windows except one
rm ~/.bash_history
history -c
- Quit and restart Terminal