I want to clean solana-test-validator so that every time I deploy localnet the data in the program account will be recorded from the beginning

  • You can either use the --reset flag or just delete the entire ledger folder.
    – Frank C.
    Commented Dec 4, 2022 at 14:25

2 Answers 2


You can use solana-test-validator -r to reset the old data and start from the beginning.


solana-test-validator --help might help to answer most of your questions about it, --reset will work in your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.