# DELETE /users/{name}/backups/{file}

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the backups group.

Delete one of a customer's on-demand backup archives

- Who may call it: administrator, reseller, customer
- Token scope, any of: backups, all
- Answers: 200 OK

An administrator or the customer can delete an archive from the customer's backups/ directory. Use the filename returned by GET /users/{name}/backups, including the .part suffix if present. The API returns 400 if the filename has an invalid format.

## As a command

- [urbestack-backup-del](https://urbestack.com/docs/commands/urbestack-backup-del.md): Deletes one of the customer's own archives from backups/ in their home directory.

## Parameters

- `name` (path, Username, required)
- `file` (path, string, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.tar\.gz(\.part)?$, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X DELETE "$API/users/alice/backups/urbestack-panel-20260909T101500Z.json.enc" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "deleted": "text"
}
```

## Errors

- 400: --file is required
- 400: --name is required
- 400: An archive is named <user>-<date>-<time>.tar.gz
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: No archive named <file>
- 404: Unknown user <name>
