> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/files/browser/delete.md).

# Delete a file

Delete a file from a storage.

**Where:** Files → Browser → click a file → **Delete** · `/projects/<project>/files/browser`

## Before you start

* Deleting cannot be undone: the file is removed from the storage itself (your bucket, container or folder), not only from Cloud.
* **Delete** acts at once — there is no confirmation dialog. Check the name in the panel before you press it.
* A folder cannot be deleted: it disappears when its last file is deleted.

## Steps

1. In **Files → Browser**, open the folder and click the file, for example `green-mug.png` in `mugs`.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-c25171a0296faa59869e222873aa1740ce82a3e6%2Fdelete-1.png?alt=media" alt="File panel of green-mug.png with a green mug picture, Path mugs/green-mug.png, Public access, and the buttons Download and Delete"><figcaption><p>The panel of the file to delete.</p></figcaption></figure>
2. Press **Delete**.

## Result

The panel closes and the file is gone from the list. The **When deleted** [triggers](/codemash/cloud/files/triggers.md) run — in the example, deleting `mugs/blue-mug-from-code.png` made **Tell support about deleted files** send its email (Email → Campaigns, status **Completed**).

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-8628fba84e78dbdf13897481d6ea2aaa8c015da8%2Fdelete-2.png?alt=media" alt="The folder mugs with blue-mug.png and red-mug.png left, both marked Public (folder)"><figcaption><p>The folder after the delete.</p></figcaption></figure>

## Change or remove it later

* A deleted file cannot be restored from Cloud: [upload it again](/codemash/cloud/files/browser/upload.md). Your provider may keep old versions if you turned versioning on in your bucket or container.

## Do it from code

```ts
await norbix.api.files.deleteFileApi({ filesIntegrationId, path: 'mugs/blue-mug-from-code.png' });
```

```sh
norbix api files file api delete --filesIntegrationId int_45rkbZX4ecZBkiv6gXe5Da --path mugs/blue-mug-from-code.png --yes
```

To delete several files in one call, use [Delete Many Files Api](/codemash/api-reference/files/bulk/delete-many-files-api.md). The client setup is on the [Files page](/codemash/cloud/files.md#use-it-from-code). API: [Delete File Api](/codemash/api-reference/files/module/delete-file-api.md)
