> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/delete-objects.md).

# Delete objects

The Delete objects action node deletes objects from the database or removes objects from a [runtime-only data source](/reference/apps/data/data-sources.md#database-connected-and-runtime-only-data-sources).

## Usage

This action node is used in two different contexts and the behavior has an important difference.

1. When used with a [database-connected data source](/reference/apps/data/data-sources.md#database-connected-and-runtime-only-data-sources), the object(s) are *permanently deleted* from the database. Any [delete rules](/reference/data-model/object-classes.md#data-validation) configured on object class properties will be enforced.
2. When used with a [runtime-only data source](/reference/apps/data/data-sources.md#database-connected-and-runtime-only-data-sources), the object(s) are *removed* from the data source. The database is not affected and [delete rules](/reference/data-model/object-classes.md#data-validation) are not enforced.

{% hint style="success" %}
**Best practice**

When deleting an object you should have the user confirm the action, for example by placing the Delete objects action node inside an [Open confirm dialog action node](/library/action-nodes/open-confirm-dialog.md).
{% endhint %}

#### Working with schemas

Delete Objects can target an [action variable](/reference/actions/action-variables.md) or [action param](/reference/actions/action-params.md) of type [schema](/reference/platform-concepts/schemas.md). When the target is a schema, the action node removes objects from the in-memory schema structure. Because schemas are not persisted in the database, deleting schema data does not affect stored data.

There is no selection mode for schemas. If the target schema is an array or contains a nested object, Delete Objects removes all the data in that schema.

## Properties

<table><thead><tr><th width="193">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data Source</strong></td><td>Select a data source that contains the object(s) to delete/remove.</td></tr><tr><td><strong>Selection</strong></td><td><p><em>Available if the selected</em> <strong>Data Source</strong> <em>is a many-cardinality data source.</em><br><br>Define the objects to delete/remove.</p><ul><li><code>All objects</code></li><li><a href="/reference/platform-concepts/objects.md#object-selection"><code>Selected object(s)</code></a></li><li><a href="/reference/platform-concepts/objects.md#object-in-context"><code>Object in context</code></a></li><li><code>Filtered selection</code></li></ul></td></tr><tr><td><strong>Filter</strong></td><td><em>Available when</em> <strong>Selection</strong> <em>is Filtered selection.</em><br><br>Define the <a href="/reference/platform-concepts/filters.md">filter</a> to apply to the data source.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/action-nodes/delete-objects.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
