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

# Delete File or Directory

> Delete a file or directory.



## OpenAPI

````yaml /sprites/api/openapi.json delete /v1/sprites/{name}/fs/delete
openapi: 3.1.0
info:
  title: Sprites API
  version: 0.1.12
  x-sprite-env-version: v0.0.1-rc48
servers:
  - url: https://api.sprites.dev
security: []
paths:
  /v1/sprites/{name}/fs/delete:
    delete:
      tags:
        - Filesystem
      summary: Delete File or Directory
      description: Delete a file or directory.
      operationId: sprite_env_delete__file_or__directory
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
          description: Success
        '400':
          description: Bad Request - Invalid request body
        '404':
          description: Not Found - Resource not found
        '500':
          description: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    DeleteRequest:
      properties:
        asRoot:
          type: boolean
        path:
          type: string
        recursive:
          type: boolean
        workingDir:
          type: string
      required:
        - path
        - workingDir
        - recursive
        - asRoot
      type: object
    DeleteResponse:
      properties:
        count:
          type: integer
        deleted:
          items:
            type: string
          type: array
      required:
        - deleted
        - count
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````