As the title states. When using CMD, one can press upper arrow key to retrieve old commands. Is it possible to erase the history of these commands? If so, how could one do so?
There is a simple keyboard short-cut, Alt+F7.
There are very few questions on
cmd that are not answered on this reference site.
Alternatively, the history is cleared every time you exit and restart
doskey /listsize=0 should do the trick.
Unlike Linux-based CLIs, In Windows all histories are cleared when you close CMD.
So, don't worry about that.