4

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.

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

2 Answers 2

5

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
2
  • I'm not seeing a history file in my datadir on my mac.....
    – tayvano
    Commented 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
    Commented May 13, 2016 at 7:22
1

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.

1
  • ATTENTION!!! This command is for the operative system history, to delete only the GETH console history see the @eth answer Commented 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.