<p><code>-rescan</code> is for your wallet. It will check for missing transactions on startup. If you want to resynchronize all blocks then I think you want to use <code>-reindex</code> which will rebuild chain state and block index from the blk*.dat files on disk. Of course, these are command line parameters.</p>

<p>You can probably use <code>verifychain</code> on bitcoin-cli. Type <code>bitcoin-cli help verifychain</code> for information.</p>

CC BY-SA 3.0
2018-02-02T14:22:40.920Z
2018-02-02T14:32:19.390Z
2018-02-02T14:32:19.390Z
Willtech
<p>Yes <code>-rescan</code> will rescan whole the entire blockchain and <code>-reindex</code> will rebuild your database </p>

CC BY-SA 3.0
2018-02-02T14:19:43.327Z
2018-02-03T05:39:33.543Z
2018-02-03T05:39:33.543Z
zhiyan114
<p>Sometimes, I need to resynchronize all blocks using bitcoin core, but I want to do that through <code>bitcoin-cli</code>. I found a command called <code>-rescan</code> that may resolve my question on this site, but as I searched the api list of bitcoin on the official site for 
<code>-rescan</code>, I couldn't find it out, therefore, I want to make it sure.</p>

<bitcoin-core><bitcoind><client>
How to resynchronize all blocks using `bitcoin-cli`?
西田龍
# How to resynchronize all blocks using `bitcoin-cli`?

(Asked by: username_0 on 2018-02-02)

Sometimes, I need to resynchronize all blocks using bitcoin core, but I want to do that through `bitcoin-cli`. I found a command called `-rescan` that may resolve my question on this site, but as I searched the api list of bitcoin on the official site for
`-rescan`, I couldn't find it out, therefore, I want to make it sure.

**Tags:** bitcoin-core, bitcoind, client


---

## 2 answers

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

`-rescan` is for your wallet. It will check for missing transactions on startup. If you want to resynchronize all blocks then I think you want to use `-reindex` which will rebuild chain state and block index from the blk\*.dat files on disk. Of course, these are command line parameters.

You can probably use `verifychain` on bitcoin-cli. Type `bitcoin-cli help verifychain` for information.


---

### Answer by username_2 on 2018-02-02. Score: 0

Yes `-rescan` will rescan whole the entire blockchain and `-reindex` will rebuild your database


---

