How do I resync the Monero blockchain from scratch?
To resync the Monero blockchain from scratch, stop your Monero node, remove its local blockchain database, and start the node again so it downloads and checks the chain from the beginning. This does not erase your XMR, but you should back up your wallet first and make sure you delete only the blockchain data—not your wallet files.
Before you delete anything
Your node is the program, usually called monerod, that downloads and checks Monero’s transaction history. Its blockchain database is separate from your wallet, which holds the keys you need to spend your coins.
Before starting:
- Back up your wallet’s recovery seed offline. Never enter it into a website or share it with support.
- If your wallet has no recovery seed, make sure you have the appropriate wallet-file and key backups.
- Check that your drive has enough free space. Look up current blockchain storage needs rather than relying on an old size estimate.
- Allow for a large download and potentially hours or days of syncing, depending on your hardware and connection.
A full resync makes sense if the database is damaged or you deliberately want a clean rebuild. If your node is merely behind, it normally resumes from where it stopped.
Stop the node and find its database
If you solo mine through this node, stop mining first. If P2Pool uses this node, stop P2Pool too. Neither can mine usefully against a node that is rebuilding its history.
Shut down monerod cleanly by entering exit in its interactive console, or by stopping the service that runs it. If the Monero GUI wallet manages your local node, stop it there and close the wallet. Confirm that monerod is no longer running.
Common default blockchain locations are:
- Windows:
C:\ProgramData\bitmonero\lmdb - Linux:
~/.bitmonero/lmdb - macOS:
~/.bitmonero/lmdb
ProgramData and folders beginning with a dot may be hidden.
If you selected a custom blockchain location, check the GUI’s node settings, your startup command’s --data-dir option, or your node configuration file. For a service, the data may belong to the service account rather than your own account.
Remove only the blockchain database
Inside the node’s data directory, find the lmdb folder. LMDB is the database format Monero uses to store blockchain data.
With the node stopped, either:
- Delete the
lmdbfolder to reclaim its space immediately. - Rename it to something like
lmdb-oldso you can keep it temporarily.
Renaming does not free any disk space. You need room for both the old database and the new one.
Do not delete your wallet files, .keys files, or recovery-seed backups. You also do not need to delete the entire bitmonero directory.
Restart and let synchronization finish
Start an up-to-date, official version of monerod using your usual data directory. It will create a fresh database and download and verify the blockchain.
For lower disk use, enable pruning from the start with --prune-blockchain. A pruned node checks the chain but keeps less historical transaction data. It still supports solo mining and P2Pool.
Check progress in the node logs or with the status command. Wait until the node reports that it is synchronized before restarting P2Pool or solo mining. Your wallet may then need time to catch up.
The bottom line
Delete only the stopped node’s blockchain database, then let monerod rebuild it. Keep your wallet backups safe, budget enough disk space and download time, and resume mining only after synchronization finishes.
