# Clear, empty, delete database for another import (development)

**URL:** <https://meta.discourse.org/t/clear-empty-delete-database-for-another-import-development/66498>\
**Category:** Product Support\
**Created:** [July 20, 2017, 10:20am UTC](https://meta.discourse.org/t/clear-empty-delete-database-for-another-import-development/66498 "2017-07-20T10:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [July 20, 2017, 12:52pm UTC](https://meta.discourse.org/t/clear-empty-delete-database-for-another-import-development/66498/3 "2017-07-20T12:52:12Z")

</div>

It’s probably also a good idea to remove uploads:

```
   rm -fr public/uploads

```

I once leaked a load of virus-infected uploads from one site I imported to another client. :sadpanda:

[Here](https://gist.github.com/pfaffman/441774b4d73bd180869cb306ffcebb0b) is a gist of my `new_discourse_database` script that kills any running rubies (you can’t drop the database if `rails s` is running), deletes uploads, makes the new database, and sets an admin user and password. It also prints an obnoxious warning and waits 5 seconds since I’ve run it by mistake a few times too many.

---

_[View the full topic](https://meta.discourse.org/t/clear-empty-delete-database-for-another-import-development/66498)._
