Apple - Clear Terminal command history
The correct command is history -c
, as shown in the picture below.
An easy way to accomplish this is to close all terminal windows, and then open a single new terminal window, where you run:
rm ~/.bash_history
You'll need to close the terminal and open it again. Now when you press arrow up, you'll only see the rm command, and not earlier commands.