v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Trash

Permanently delete a single item from the trash

Force-deletes a single item from the current user's ~/.trash directory. Unlike Fileman.fileop op=unlink, this uses a non-safe recursive delete, so permission-locked entries (e.g. a 0444 file or a 0555 subdirectory preserved from a backup) are actually removed instead of being silently skipped and falsely reported as deleted. The path parameter must resolve strictly within ~/.trash (symlinks and .. traversal are resolved before the confinement check runs); the trash root itself can never be the target. If the target is already absent, this is an idempotent success rather than an error. On success, the stale line (if any) for the removed item is pruned from the trash's restore map.

post/Trash/remove

Query parameters

pathstring required

Home-relative path of the item to permanently delete. Must resolve strictly within ~/.trash.

Response

HTTP Request was successful.

apiversioninteger
funcstring
modulestring

Example response

{
  "apiversion": 3,
  "func": "remove",
  "module": "Trash",
  "result": {
    "data": {
      "removed": true
    },
    "status": 1
  }
}