How can I remove a certain line from history's database?

link|improve this question

55% accept rate
5  
Please don't write "Thanks" comments all over the place. Upvote answers you find helpful and accept the ones that helped you most. This is the way to say thanks here. – slhck Jan 31 at 16:33
feedback

3 Answers

up vote 7 down vote accepted

Just edit the file ~/.bash_history.

link|improve this answer
feedback

Typing "history -d xxx" will delete a specified line. You then have to type "history -w" to make them permanent. It also removes them from the .bash_history file. The surest fire way is cYrus's answer.

link|improve this answer
feedback

Both answers a correct for fixing after the fact.

Simply put a {space} before any command in terminal will prevent it from being logged in the first place.

Remove all records: {space}history -c -w

link|improve this answer
Wow, that is amazing. Never have tried/heard of this option – w0rldart Feb 1 at 23:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.