How to delete the command history in cmd.exe

Written by joshua benjamin | 13/05/2017
How to delete the command history in cmd.exe
(Jupiterimages/Creatas/Getty Images)

Whenever you run a command through the Run dialogue box -- or the Windows Live Search Box in Vista or Windows 7 -- Windows saves it in the Windows Registry. When you want to run this command again, you only need to type in a letter or two and Windows will give you the option of selecting the command from a drop-down list. If this list becomes too overpopulated -- and it will if you run numerous commands -- you may want to clear the history. This can be accomplished by typing a simple command into the Windows Command Prompt.

Open the Start menu and type "CMD" into the Windows Live Search box. Or, if you are using Windows XP, launch the "Run" dialogue box and type "CMD" into that instead.

Press "Enter" to bring up the Command Prompt window.

Type the following command into the Command Prompt:

reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f

Press the "Enter" key to execute the command. This will delete the registry value that contains all the stored command history from your computer.

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.