# Database Cleanup while writing a new Import Script

**URL:** <https://meta.discourse.org/t/database-cleanup-while-writing-a-new-import-script/94134>\
**Category:** Development\
**Created:** [August 7, 2018, 4:59pm UTC](https://meta.discourse.org/t/database-cleanup-while-writing-a-new-import-script/94134 "2018-08-07T16:59:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![praveendhinwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/praveendhinwa/32/108964_2.png) [@praveendhinwa](https://meta.discourse.org/u/praveendhinwa)\
**Post date:** [August 7, 2018, 4:59pm UTC](https://meta.discourse.org/t/database-cleanup-while-writing-a-new-import-script/94134/1 "2018-08-07T16:59:17Z")

</div>

Hello Friends,

I am trying to write an import script from OSQA to discourse. I have local Ubuntu installation of discourse. I wanted a way to know whether there is some cleanup script available which can delete all the data from all the tables of the discourse? Currently, when I run the script, the next time the entries already inserted are skipped.

If such a cleanup script was available, then I can experiment locally frequently, and it will help me essentially in writing such a script. If such a script is not available, then I guess my course is to just create stored function in PSQL.

Please guide me regarding this. I would be very thankful for this.

---

_[View the full topic](https://meta.discourse.org/t/database-cleanup-while-writing-a-new-import-script/94134)._
