[SOLVED] How can I delete past commands

mehmethanifi

Well-Known Member
Dec 15, 2016
61
4
48
39
I use the history -r and history -c commands to delete the history commands.
When I do history afterwards, the commands seem to have been deleted.
But when I enter the cls screen later and say history, it lists the last 500 commands for me.

is there any way to erase the history completely?

Thank you...
 
hi,

is there any way to erase the history completely?

this depends on the shell you're using -- if you're using the default bash:
Code:
echo "" > ~/.bash_history ; history -c ; exit

and when you login again and press up arrow or check history it should be cleaned.