clear terminal cache [duplicate]
I need to clear the terminal cache, I have tried with history -c but it clears the cache in that terminal session, but if I open another session and type history it shows all the previous commands.
2 Answers
See this question, with a few solutions if you are using bash as your shell. There are a few different options, depending on what you are trying to accomplish. There are some ways to clear it now, and ways to clear it on login or logout.
How to clear bash history completely?
Basically speaking, history -c clears it but you need to do a history -w to write the empty file to your ~/.bash_history.
Maybe this happened because you were running it from a terminal emulator, if you want to delete all your history (be wary), you can try to delete directly the file which log it:
rm ~/.bash_history More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"