It happens. The reason is the datadir being used for creating the account. for
geth account new
the default datadir is used is "~/.ethereum/keystore"(it's on my ubuntu OS).
You can go to that directory and see. There shall be one file of format "UTC--2017-02-13T07-14-57.563336682Z--your account". this is the account, which gets created when you do
geth account new
if you're running your private chain using geth, then you must have defined your own datadir while starting the geth console. so, when you do
personal.newAccount()
it goes into the "datadir/keystore".
Now, if you want the account created by
geth account new
to come under the
eth.accounts
You simply do cp from the "~/.ethereum/keystore" to "datadir/keystore".
you shall be able to see the accounts in the
eth.accounts
in your console.
Now, if you want that your all future accounts, create using
geth account new
must be visible when you do
eth.accounts
in geth console, then you must do this:
geth --datadir "**path to your data dir**" account new
This shall create all the accounts, as per your private chain datadir. and you shall be able to see all the accounts.
Hope it helps.
Thanks
Best Answer
You can't remove account. You need to remove them directly from your keystore folder.
IT IS IRREVERSIBLE.
~/Library/Ethereum/keystore
I feel the need to repeat that once the file is deleted it's Game over.