When you type something on linux shell, by default Linux save the commands what you type as history to “~/.bash_history” or /home/username/.bash_history file so that you can easily check what you have typed previously using “history” command.
As you can see, we just showed last output of “history” command. You can use only “history” without “tail” to see all the complete history.
The easiest way to clear history is to use “history -c” command for the current terminal. This command only clears history of current terminal and if you close the terminal and start again, you will see the last saved history from “~/.bash_history” file.
If you want to wipe-out all the history so that even after restarting of terminal it shouldn’t show any details, you will need to clear the “~/.bash_history” file contents.
Now, if you close and open the terminal, you will not see any history.