Comments on: How to Clear BASH Command Line History in Linux https://www.tecmint.com/clear-command-line-history-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 13 Jul 2023 13:12:54 +0000 hourly 1 By: Adam https://www.tecmint.com/clear-command-line-history-in-linux/comment-page-1/#comment-1860169 Wed, 10 Aug 2022 14:30:47 +0000 https://www.tecmint.com/?p=28197#comment-1860169 You can also delete a series of lines like so:

$ history -d 541-549
]]>
By: Aliyu https://www.tecmint.com/clear-command-line-history-in-linux/comment-page-1/#comment-1695340 Mon, 03 Jan 2022 05:44:30 +0000 https://www.tecmint.com/?p=28197#comment-1695340 You can also use this command to remove the history:

$ cd /home/username
$ rm .zsh_history
]]>
By: Aaron Kili https://www.tecmint.com/clear-command-line-history-in-linux/comment-page-1/#comment-974748 Wed, 07 Mar 2018 07:31:09 +0000 https://www.tecmint.com/?p=28197#comment-974748 In reply to AJ.

@AJ

Sure, we will crosscheck this. Many thanks for the feedback.

]]>
By: AJ https://www.tecmint.com/clear-command-line-history-in-linux/comment-page-1/#comment-974209 Mon, 05 Mar 2018 13:33:30 +0000 https://www.tecmint.com/?p=28197#comment-974209 I opened the .bash_history file. Found the line I wanted to delete. ‘

$ history -d "#### "

Went back to .bash_history. The line was still there…

Went and edited in vim

Worked

]]>
By: Aaron Kili https://www.tecmint.com/clear-command-line-history-in-linux/comment-page-1/#comment-956828 Tue, 02 Jan 2018 05:57:45 +0000 https://www.tecmint.com/?p=28197#comment-956828 In reply to Out.

@Out

Yes, it’s really short.

]]>