<p>You can delete all of your existing entries and assets by executing this SQL query:</p>



<pre class="lang-sql prettyprint-override"><code>DELETE FROM craft_elements
WHERE type IN ('Entry', 'Category', 'Tag', 'Asset')
</code></pre>

<p>All associated content, relationships, etc., will automatically be deleted.</p>

<p>If you have a bunch of users you want to delete, you should at least spare your own admin account, so figure out your user ID and do this:</p>

<pre class="lang-sql prettyprint-override"><code>DELETE FROM craft_elements
WHERE type IN ('Entry', 'Category', 'Tag', 'Asset', 'User')
AND id != 1
</code></pre>

<p>(The admin account created during installation will have the ID of 1, assuming you haven’t deleted the account.)</p>

<p>You should also delete existing asset sources, assuming those are going to need to change and will have their own sets of files. You can either do that from the Control Panel, or execute this SQL query:</p>

<pre class="lang-sql prettyprint-override"><code>DELETE FROM craft_assetsources
</code></pre>

CC BY-SA 3.0
2016-06-02T14:34:54.080Z
2016-06-02T14:34:54.080Z
Brandon Kelly
<p>I duplicated a site.  What is the easiest way to delete all assets and text data but keep fields and sections in place?</p>

<content><deletion>
How can I remove all text content and assets from a duplicated site?
# How can I remove all text content and assets from a duplicated site?

(Asked by: username_0 on 2016-06-02)

I duplicated a site. What is the easiest way to delete all assets and text data but keep fields and sections in place?

**Tags:** content, deletion

---

## 1 answers

### Answer by username_1 on 2016-06-02. Score: 8 | Accepted answer

You can delete all of your existing entries and assets by executing this SQL query:
DELETE FROM craft_elements
WHERE type IN ('Entry', 'Category', 'Tag', 'Asset')

All associated content, relationships, etc., will automatically be deleted.
If you have a bunch of users you want to delete, you should at least spare your own admin account, so figure out your user ID and do this:
DELETE FROM craft_elements
WHERE type IN ('Entry', 'Category', 'Tag', 'Asset', 'User')
AND id != 1

(The admin account created during installation will have the ID of 1, assuming you haven’t deleted the account.)
You should also delete existing asset sources, assuming those are going to need to change and will have their own sets of files. You can either do that from the Control Panel, or execute this SQL query:
DELETE FROM craft_assetsources


---

