This question already has an answer here:

How to clear the history of recent commands in terminal so that I am unable to scroll through them with up and down arrow keys? Closing and reopening the terminal doesn't seem to clear the history. Nor does the reset command

marked as duplicate by muru, Community Nov 4 '16 at 13:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


In case of bash you could simply delete the content of ~/.bash_history.

The following should do it:

> ~/.bash_history

Not the answer you're looking for? Browse other questions tagged or ask your own question.