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.>
If you want to delete history from a particular session, run:
sqlite ~/.ipython/profile_default/history.sqlite
Note that on some systems, you will need to run sqlite3 rather than sqlite.
Inside SQLite:
select * from history;
# session is the first column in history
delete from history where session=XXX;
Also, here is a SQLite query that will give you the id of your last session:
select session from history order by -session limit 1;