clear history

This command deletes the CLI's command history buffer. The buffer stores all commands that you have run in the current CLI session. Typically, if you want to recall a previously typed command, which is stored in the history buffer, you press the up and down arrow keys.

Syntax

# clear history [<index>]

Command

Description

clear history

Deletes all commands from the command history buffer.

clear history <index>

Deletes a specific command (by index) from the command history buffer.

Related Commands

history - displays all commands in the command history buffer (by index).

Command Mode

Privileged User

Example

This example clears the historical command that is stored in the buffer at index 5 (i.e., ignore-auth-stale):

# history
  1  e
  2  history
  3  configure voip
  4  sip-definition settings
  5  ignore-auth-stale
  6  ex
  7  ex

# clear history 5