Delete terminal history in Linux

Frank Vilea picture Frank Vilea · Jul 15, 2011 · Viewed 206.7k times · Source

When you use the up key in a Linux terminal, you can use previous commands again. Great feature. However, I started logging mysql into mysql with the sensitive details in the command.

How can I delete that history?

Answer

Eddie picture Eddie · Jul 15, 2011

You can clear your bash history like this:

history -cw