Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How could I delete specific line of command history

Hello,


I am working in zsh terminal and how could I delete specific line of command history? I've already tried history -d <lineNumber> but it seems not work. Any suggestion will be appreciated.

MacBook Pro 16", macOS 10.15

Posted on Apr 27, 2020 7:46 AM

Reply
Question marked as Best reply

Posted on Apr 29, 2020 9:59 AM

Thank you for your reply. I had ever tried opening a new terminal, however it seems not work :(

Each new terminal window starts another login session which runs all the config files, so that would reload the history file.


5 replies

How could I delete specific line of command history

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.