v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Fileman
Manage Files

Delete a file permanently

This function permanently removes a file or directory. The function removes directories recursively. This action cannot be undone; to remove a file reversibly, use the trash_file function instead.

Important:

When you disable the File Storage role, the system disables this function.

get/Fileman/delete_file

Query parameters

pathstring path required
Example:public_html/unwanted.txt

The path to the file or directory to delete.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "delete_file",
  "module": "Fileman",
  "result": {
    "data": {
      "path": "/home/user/public_html/unwanted.txt"
    },
    "status": 1
  }
}