# delete

Canonical URL: https://developers.iagenify.com/sdk/agent/tools/delete/
Language: en

`delete({ path })`

Move a file or folder to the workspace recycle bin, where the user can get it back. Nothing is destroyed.

Status: category: write · recoverable · not a real deletion

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `path` | string | required | The file or folder. |

## It is a move into .trash {#trash}

The item goes to `.trash/<timestamp>/<original path>`. Hidden folders are left out of listings, so it disappears from the agent's view while every byte stays.

## Why there is no real deletion {#why}

> **An agent acts on text it has read**
>
> A page, a document, an instruction it was given. One mistaken step should not be final, so the destructive operation is simply not declared — what is declared is the reversible one.

## Getting something back {#restoring}

```javascript
await pc.files.move(".trash/2026-10-07T09-12-44-000Z/Notes/draft.md", "Notes/draft.md");
```

## The bin is never emptied on its own {#emptying}

Deciding that something is really gone is the account holder's. It also counts against the workspace's space, so it is worth clearing deliberately.

- [move](/sdk/agent/tools/move): The operation underneath.
- [files.remove()](/sdk/ref/local-files/remove): The real deletion, from your code.
- [Agent tools](/sdk/agent/tools): The 35, by family.

```python
pc.files.move(".trash/2026-10-07T09-12-44-000Z/Notes/draft.md", "Notes/draft.md")
```
