I have been learning how to use the paramiko package only to discover that all I stored passwords in plain text in IPython\'s %hist. Not so good.>
Combining @Ovidiu Ghinet's answer with @Matt's accepted answer:
sqlite $(ipython locate)/profile_*/*.sqlite || sqlite3 $(ipython locate)/profile_*/*.sqlite
Then from within sqlite console:
delete from history where source like '%password%';
select * from history; /* confirm that no passwords left */
.quit /* forgot how to exit sqlite console? ;) */