# Delete item from Trash

This function permanently deletes a single item from the .trash
directory in the current cPanel account's home directory.

Note:
Unlike the Fileman::fileop function with op=unlink, this function
uses a non-safe recursive delete, so it removes permission-locked
entries instead of skipping them silently and reporting them as deleted.
Such an entry might be a 0444 file or a 0555 subdirectory preserved
from a backup.

If the target is already absent, the function reports an idempotent
success rather than an error. On success, it also prunes the stale line
for the removed item, if there is one, from the trash's restore map.

Endpoint: POST /Trash/remove
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `path` (string, required)
    The path of the item to permanently delete.

Note:
This parameter
must resolve strictly within the .trash directory in the account's
home directory. A leading slash is read relative to the home
directory, so /.trash/backup-7.14.2026_16-35-25 is the expected
form. The function resolves symlinks and .. traversal before it
runs that confinement check, and the trash directory itself can
never be the target.
    Example: "/.trash/backup-7.14.2026_16-35-25"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "remove"

  - `module` (string)
    The name of the module called.
    Example: "Trash"

  - `result` (object)

  - `result.data` (object)

  - `result.data.alreadyGone` (boolean)
    True when the target was already absent, which the
function reports as an idempotent success. Omitted
otherwise.

  - `result.data.removed` (boolean)
    Always true on success.
    Example: true

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more
  details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings
describe non-critical failures or other problematic
conditions noted while running an API.


