> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete File

Delete one file from a draft revision of an app blob. `blobhub app push` calls it for each file the build no
longer holds.

## **POST** `/revisions/:id/data/command` (Command: `delete_file`)

### Request Body

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `command` | string | Yes | Must be `delete_file`. |
| `path` | string | Yes | The file to delete, relative to the app's root. |

### Response

The response is empty: it carries `status` and nothing else. A path the revision does not hold succeeds too, so a
push converges whatever state the draft was in.

### Errors

| Status | Error | Cause |
| :- | :- | :- |
| 400 | `invalid_request_body` | `path` breaks the [path rule](https://docs.blobhub.io/blob-types/app/operations/put-file.md#request-body). |
| 403 | `forbidden` | The caller does not have WRITE on the app blob. |
| 409 | `revision_not_writable` | The revision is committed. A version never changes. |

### Example

```json Request theme={null}
{
  "command": "delete_file",
  "path": "blobs/flows/definitions/old-report.json"
}
```

```json Response theme={null}
{
  "status": "success"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.