how do I delete the geth console history ?

I'm concerned with this, especially in light of this recent Mist hack :

On the console you can also unlock accounts (one at a time).

personal.unlockAccount(address, "password")

Note that we do NOT recommend using the password argument here, since the console history is logged, so you may compromise your account. You have been warned.

  • Note that the current version of geth does not record (properly formed) console commands that include a password. Jul 7, 2017 at 18:46

2 Answers 2


There's a history file in Geth's datadir that you can delete.

The default datadir is:

Mac: ~/Library/Ethereum
Linux: ~/.ethereum
Windows: %APPDATA%/Ethereum
  • I'm not seeing a history file in my datadir on my mac.....
    – tayvano
    May 13, 2016 at 7:08
  • i got it on my linux, try a real OS ;) joke aside I ran this regexp on my history and I never entered the pass so safe ;) personal.unlockAccount\(.*(?<=,)(.*)(?=\))
    – euri10
    May 13, 2016 at 7:22

Not sure if this works for windows but for linux / mac or anything bash this should work:

Your history is stored in ~/.bash_history. So you can delete that file ( rm ~/.bash_history via CLI)

or edit that file to just remove the line where you typed the password

or run history -c && history -w

Then quit all instances of your terminal and reopen and press the up key to ensure everything is gone.

Also, don't run the non interactive versions of anything that require your password. I don't know why they include them. It's asking for trouble.

  • ATTENTION!!! This command is for the operative system history, to delete only the GETH console history see the @eth answer Nov 21, 2017 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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