If you wanna wipe out the history file (in BASH):
If you wanna preserve some lines, you can do:
tail --lines=number .bash_history > .bash_history.tmp; mv .bash_history.tmp .bash_history
But I don't know how you managed to get your passwords in you history file. Or maybe I just don't understand your problem.