It is no longer possible for me to clear my Terminal in macOS (Big Sur v11.5).
https://ss64.com/osx/history.html is not showing correct information anymore.
Others than me seem to have the same issue: https://github.com/ohmyzsh/ohmyzsh/issues/8869
Please help me clear my Terminal history.
Thank you.
history -c
- Simon Sheppard
- Posts: 170
- Joined: 2021-Jul-10, 7:46 pm
- Contact:
Re: history -c
Hi flair
The history command is a built-in command so the options will be different when running the bash shell or the zsh shell on macOS.
I am planning to update the SS64 pages to cover both bash and zsh, but that probably wont happen until next year.
In the meantime, this stackexchange answer details how to clear history in zsh, it should be the same on macOS
https://unix.stackexchange.com/question ... ory-in-zsh
The history command is a built-in command so the options will be different when running the bash shell or the zsh shell on macOS.
I am planning to update the SS64 pages to cover both bash and zsh, but that probably wont happen until next year.
In the meantime, this stackexchange answer details how to clear history in zsh, it should be the same on macOS
https://unix.stackexchange.com/question ... ory-in-zsh
Code: Select all
function erase_history { local HISTSIZE=0; }
erase_history