This thread is about how to rebuild the ledger
A rebuild of the ledger might be necessary in case it is corrupted or due to a bug, but also for integrity checks. The ledger and related data are stored in the user’s userdata folder and represents your ‘view’ on the tangle.
To trigger a rebuild of the ledger for a given user you can execute ucs_client.sh with the additional parameter -new_ledger :
./ucs_client.sh -new_ledger -action […]
As an alternative you can simply remove all *.dat files in the user’s userdata folder:
rm userdata/YOURADDRESS/*.dat
To trigger a rebuild of the ledger for all users simply remove all *.dat files in the user’s userdata folders:
rm userdata/*/*.dat