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

# rm

> Delete a file or directory from the workspace

The `rm` command deletes a file or directory from your workspace.

```bash theme={null}
dv rm --path <path> [--workspace_id <workspace_id>]
```

**Required Parameters:**

* `--path` - The path to the file or directory to delete

**Optional Parameters:**

* `--workspace_id` - The ID of the workspace to delete from (defaults to current workspace)

This command is useful for removing files or directories programmatically or from scripts.

<Warning>
  This command deletes files from your workspace. Make sure you want to remove the specified path before running this command.
</Warning>

An example of deleting a file:

```bash theme={null}
dv rm --path /game/old_asset.png
```

An example of deleting a directory:

```bash theme={null}
dv rm --path /deprecated/features
```

<Note>
  After using `rm`, you'll still need to commit the changes to save the deletion to your branch.
</Note>
