How to remove or clear the history of all the commands that were executed in the Linux terminal?

August 11, 2021 - 1 min read

To remove the history or the traces of all the commands executed, you can use the history command followed by the -c flag (clear contents flag) in the Linux terminal.

# Clear all the traces or the history
# of commands executed
history -c
  • You may have to restart your current terminal session to check if the history has been deleted.

See the execution of the above command live in

That's all 😃!

Feel free to share if you found this useful 😃.