---
title: "(-- api-linter: core::0136::http-method=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource, not a standard Delete method. It uses POST for consistency with other custom methods on the Filesystem singleton. --) (-- api-linter: core::0136::verb-noun=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource. The \"remove\" verb follows Unix convention (rm) and clearly conveys imperative action for filesystem operations. --) (-- api-linter: core::0133::synonyms=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource. The \"remove\" verb follows Unix convention (rm) and clearly conveys imperative action. --) Removes (deletes) a file or directory. Automatically detects whether the path is a file or directory. If the path is a symbolic link, the link itself is removed, not its target."
method: POST
path: "/v1/{name}/filesystem:remove"
tags: ["FilesystemService"]
---

# (-- api-linter: core::0136::http-method=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource, not a standard Delete method. It uses POST for consistency with other custom methods on the Filesystem singleton. --) (-- api-linter: core::0136::verb-noun=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource. The "remove" verb follows Unix convention (rm) and clearly conveys imperative action for filesystem operations. --) (-- api-linter: core::0133::synonyms=disabled aip.dev/not-precedent: Remove is a custom method on a singleton resource. The "remove" verb follows Unix convention (rm) and clearly conveys imperative action. --) Removes (deletes) a file or directory. Automatically detects whether the path is a file or directory. If the path is a symbolic link, the link itself is removed, not its target.

`POST /v1/{name}/filesystem:remove`

## Request

- Base URL: `https://docs.h2o.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.h2o.ai/v1/{name}/filesystem:remove`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:name/filesystem:remove/post.ts> (a function with typed inputs; its response is checked against the schema)

Authorization: Only the creator of the parent SandboxEngine is allowed to call this method.

## Path parameters

- `name` string, required

## Request body

- object: Request to remove a file or directory.
  - `path` string, required: Required. The path to the file or directory to delete. All paths are rooted at the sandbox filesystem root. Must start with a forward slash (e.g., "/app.js", "/workspace/data"). If the path is a symbolic link, the link itself is removed, not its target.
  - `recursive` boolean

## Response `200`

A successful response.

- V1RemoveResponse: Response from removing a file or directory.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto.md) - [All operations](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/revisions/297cfadc1d39?raw)
