How can I delete all the documents in a doctype using terminal?

Hello there!

How can I delete all the documents in a doctype?
using terminal ;
delete from tabModule Def
but I’m not sure of the syntax.

please any idea?

Hi @oip_p,
Make sure, first take a backup.

Example:
If you want to delete all records from the ToDo doctype using the terminal, then apply it.

bench --site your-sitename.com mariadb
TRUNCATE `tabToDo`;

Your all record will remove.
Then reload and check it.

Thank You!

1 Like