I am using PostgreSQL as a database for DSpace project. I am inserted some records in tables now i want a script with the help of which the database become empty only it contains the data in that table which is automatically inserted during fresh install.
[dspace]/bin/dspace database clean
[dspace]/bin/dspace database migrate
Swap in your actual DSpace install directory for [dspace].
According to the official DSpace documentation:
running "dspace database clean" followed by "dspace database migrate" will return your database to a fresh install state