How do I clear my Bash history in Mac OS X?
I've entered a few "errors" and just want to clear them off. How do I do that?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
To clear it, just delete the
~/.bash_history file. If you want to just remove the offending lines you can open
~/.bash_history in the editor of your choice. For me, this would be
and then going to the beginning of each bad line and pressing control ^+K.
Or your can just fill your
.bash_history with empty.
Run this: (including the