Forrest logo
back to the history tool

history:tldr:e6ed2

history: Clear the commands history list (only for current `bash` shell).
$ history -c
try on your machine

The command "history -c" is used in command-line interfaces to clear the history of previously executed commands. When you run this command, it clears the entire command history list, effectively erasing all the previously typed and executed commands. This means that when you press the up arrow or use the history command again, no commands will be displayed. Essentially, it provides a clean slate for tracking and storing command history from that point onwards.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • how do I delete history on a linux prompt ? ?
back to the history tool