Returning to some Ethereum work I wanted to reset my old local blockchain by deleting it an starting from scratch. Here are notes to describe what to do.
On OSX Ethereum installs in $HOME/Library/Ethereum. The public data is in geth
while the testnet
directory contains the testnet data.
BEFORE
|-- geth
| |-- LOCK
| |-- chaindata
| |-- ethash
| |-- nodekey
| `-- nodes
|-- history
|-- keystore
`-- testnet
|-- geth
| |-- LOCK
| |-- chaindata
| |-- ethash
| |-- nodekey
| `-- nodes
|-- history
`-- keystore
8 directories, 5 files
COMMAND
$ geth removedb
$ cd /Users/brad/Library/Ethereum
$ du -sh geth
20G geth
$ geth removedb
/Users/brad/Library/Ethereum/geth/chaindata
Remove this database? [y/N] y
Removing...
Removed in 1.426841522s
$ du -sh geth
109M geth
COMMAND
$ geth --testnet removedb
$ cd /Users/brad/Library/Ethereum
$ du -sh testnet/
5.1G testnet/
$ geth --testnet removedb
/Users/brad/Library/Ethereum/testnet/geth/chaindata
Remove this database? [y/N] y
Removing...
Removed in 526.733895ms
$ du -sh testnet/
26M testnet/
AFTER
|-- geth
| |-- LOCK
| |-- ethash
| |-- nodekey
| `-- nodes
|-- history
|-- keystore
`-- testnet
|-- geth
|-- history
`-- keystore
7 directories, 5 files
$ geth --testnet --fast --cache=2048
$ geth --testnet --fast --cache=2048