clear terminal cache

12,323

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.

Share:
12,323

Related videos on Youtube

Jaime Roman
Author by

Jaime Roman

DE DÍA: desarrollador, php. DE NOCHE: padre de familia. POR DIVERSIÓN:visitar amigos, practicar deporte, pasear con la familia.

Updated on September 18, 2022

Comments

  • Jaime Roman
    Jaime Roman over 1 year

    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.