We can exclude any shell’s command from history by prepending whitepspace ’ ’ before the command. This is useful if we are inserting password or any sensitive commands. In the case that we forgot to do that, we can delete the command from shell’s history file such as .bash_history
or .zsh_history
.