Clear the Database

I wanted to clear all the data from the database and make a fresh start.
Can anyone plz guide me the exact steps to clear the database

Thank You…

@seetamN you can use bench --site sitename reinstall check this ERPNext reset database

2 Likes

@seetamN
There are many ways to do this :

  1. bench --site {site-name} reinstall
    
  2. If you just want to clear all transactions i.e Journal Entries, Sales Invoices, Payment Entries and other except masters. Goto Company List on top right you will see Delete Traansactions Option under Manage Button. ( there you have to enter Company Name and Admin Password )

    image

  3. Drop an existing site. In this operation, the database is dropped and the respective site’s folder is moved from ./sites to ./archived_sites

    Command:

    bench drop-site [OPTIONS] {site-name} 
    

    Options may be --force or --no-backup

  4. Create New Site as you want to fresh start.
    Command:

    bench new-site {site-name}
    
3 Likes

Thank you @Abhishek_Chougule and @Jeel for your suggestion it worked for me.
I did a reinstall.

1 Like