# DROP STAGE {FILE | FOLDER}

Deletes a file or folder at the specified path within a [Stage](https://docs.singlestore.com/cloud/load-data/load-data-from-files/stage.md).

## Syntax

```
DROP STAGE {FILE | FOLDER} '<stage_path>' 
   [ { IN GROUP { ID '<deployment_ID>' | '<deployment_name>' } | IN { ID '<deployment_ID>' | '<deployment_name>' } } ]
   [RECURSIVE]
```

## Arguments

* `stage_path`: The path to the file or folder in the Stage. Folder paths must end with a trailing `/`.
* `deployment_ID`, `deployment_name`: The ID or name of the deployment (workspace group) in which the Stage is attached.

## Remarks

* The `IN` and `IN GROUP` clauses specify the ID or the name of the deployment in which the Stage is attached.
* To delete a folder, use the `FOLDER '<stage_path>' ... [RECURSIVE]` clause. The path must end with a trailing `/`.
* The `RECURSIVE` clause is only supported in the `DROP STAGE FOLDER` command.
* If the `RECURSIVE` clause is specified, the specified folder is deleted recursively, i.e., the contents of the specified folder are deleted before the folder itself is deleted.
* To delete a file, use the `FILE <stage_path> ...` clause.

## Examples

* The following command deletes a file in the Stage attached to a deployment named **s2wsg**:
  ```sql
  DROP STAGE FILE '/data/stats.csv' IN 's2wsg';

  ```
* The following command deletes a folder in the Stage attached to a deployment named **s2wsg**:
  ```sql
  DROP STAGE FOLDER '/data/' IN 's2wsg' RECURSIVE; 
  ```

***

Modified at: February 13, 2025

Source: [/cloud/reference/fusion-sql/drop-stage-file-folder/](https://docs.singlestore.com/cloud/reference/fusion-sql/drop-stage-file-folder/)

(An index of the documentation is available at /llms.txt)
