How To Clear Command Prompt History in Windows

How to clear command prompt history in Windows? If you own Windows and using command prompt throughout your workday then you must need to periodically clear your command prompt history. And yes that is possible even if your command prompt windows are opened.

How To Clear Command Prompt History in Windows?

There is a simple keyboard shortcut for doing so while the command prompt is still open,

Alt+F7

Alternatively, the command history is cleared every time you exit wand restart the command prompt.

If you want to explore further, you will find that there are very few questions about the command prompt that are not answered on the SS64 reference website.


Keyboard shortcuts for the Windows CMD shell and PowerShell.

ALT+ENTER Switch to/from full screen mode.
  [Tab]    Autocomplete folder/file name.
  ↓ / ↑    Scroll through history of typed commands.
 F1 F1 F1  Print characters of the previous command one by one.
  F2 Z     Repeat part of the previous command; up to character Z
  F3       Repeat the previous command.
  F4 Z     Beginning from the current cursor position, delete up to character Z.
  F5       Scroll through history of typed commands (↑).
  F7       Show history of previous commands.
 ALT+F7    Clear command history.
  F8       Move backwards through the command history, but only display
           commands matching the current text at the command prompt.
  F9       Run a specific command from the command history.
  ESC      Clear command line.
 INSERT    Toggle Insert/Overwrite.
 Ctrl Home Erase line to the left.
 Ctrl End  Erase line to the right.
 Ctrl ←    Move one word to the left (backward).
 Ctrl →    Move one word to the right (forward).
  ⌫       Erase character to the left.
 [Home]    Move to beginning of line.
 [End]     Move to end of line.
  ⇧ PgUp   Scroll window up.
  ⇧ PgDn   Scroll window Down.
 Ctrl-C    Abort current command/typing.
Left Alt + Left ⇧ + PrtScn
           Toggle High Visibility screen mode.
 Ctrl-Z    Signal end-of-file.

Group Policy GPO

 F5  Mark all settings on the page as "green" (apply all).
 F6  Mark current settings on the page as "green" (apply this setting).
 F7  Mark current settings as "red" (don't apply this setting).
 F8  Mark all settings on the page as "red" (don't apply).
 F3  Display a list of available variables.

⇧ is the Shift key<br>⌫ is the Backspace key

Back to top button
Close