<p>The testnet data directory is not <code>~/.bitcoin</code> but rather <code>~/.bitcoin/testnet3</code>. <code>~/.bitcoin</code> holds the data for the main Bitcoin blockchain.</p>

CC BY-SA 4.0
2018-05-21T17:46:55.217Z
So you'll want to wipe out `~/.bitcoin/testnet3/blocks` and `~/.bitcoin/testnet3/chainstate`.  Maybe also `mempool.dat`.
Nate Eldredge
CC BY-SA 4.0
2018-05-21T17:45:31.633Z
2018-05-21T17:45:31.633Z
Ava Chow
<p>I'm running a private bitcoin network and would like to reset the bitcoin blockchain data back to the genesis block.  </p>

<p>I've tried deleting all the files in <code>~/.bitcoin/blocks</code> and <code>~/.bitcoin/wallets</code> but <code>bitcoin-cli -testnet getblockchaininfo</code> still shows existing blocks.</p>

<pre><code>$ bitcoin-cli -testnet getblockchaininfo
{
  "chain": "test",
  "blocks": 10,
  "headers": 10,
  "bestblockhash": "000000008668c111d16fd895919969836292a61919c6150a0f9a1dd5cc41aa55",
  "difficulty": 1,
  "mediantime": 1526598651,
  "verificationprogress": 6.116528714283428e-07,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000b000b000b",
  "size_on_disk": 2573,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    }
  },
  "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}
</code></pre>

<testnet><private-blockchains>
How to reset bitcoin testnet
JBaczuk
# How to reset bitcoin testnet

(Asked by: username_0 on 2018-05-21)

I'm running a private bitcoin network and would like to reset the bitcoin blockchain data back to the genesis block.

I've tried deleting all the files in `~/.bitcoin/blocks` and `~/.bitcoin/wallets` but `bitcoin-cli -testnet getblockchaininfo` still shows existing blocks.

```
$ bitcoin-cli -testnet getblockchaininfo
{
  "chain": "test",
  "blocks": 10,
  "headers": 10,
  "bestblockhash": "000000008668c111d16fd895919969836292a61919c6150a0f9a1dd5cc41aa55",
  "difficulty": 1,
  "mediantime": 1526598651,
  "verificationprogress": 6.116528714283428e-07,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000b000b000b",
  "size_on_disk": 2573,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    }
  },
  "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}

```

**Tags:** testnet, private-blockchains


---

## 1 answers

### Answer by username_1 on 2018-05-21. Score: 3 | Accepted answer

The testnet data directory is not `~/.bitcoin` but rather `~/.bitcoin/testnet3`. `~/.bitcoin` holds the data for the main Bitcoin blockchain.

> **Comments:**
> **username_2**: So you'll want to wipe out `~/.bitcoin/testnet3/blocks` and `~/.bitcoin/testnet3/chainstate`.  Maybe also `mempool.dat`.  

---

