# DELETE /packages/{name}

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

UrbeStack release 0.2.35 API operation in the users group.

Delete a hosting package

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

To delete a package with assigned customers, use move_to to reassign them to another package with the same owner, or set no_package to true to remove their package assignments and all package limits. A nonempty move_to takes precedence over no_package. UrbeStack refuses to delete a package in use without either option.

Each move uses the standard checks for changing a customer's package and applies the new disk quota and bandwidth restrictions immediately. If a move fails, UrbeStack stops, names the customer in the error, and retains the package. Customers already moved keep their new assignments.

Administrators can delete any package. Resellers can delete only their own packages. Returns 400 for an invalid package name in name or move_to, 403 if a reseller requests an administrator-owned package, and 404 if the package is missing or belongs to another reseller and the caller is a reseller.

## As a command

- [urbestack-package-del](https://urbestack.com/docs/commands/urbestack-package-del.md): Deletes the hosting package specified by --name.

## Parameters

- `name` (path, PackageName, required)
- `move_to` (query, PackageName): Name of another package with the same owner to which the customers will be moved.
- `no_package` (query, boolean): Set to true to remove the customers' package assignments and all package limits.

## 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/packages/alice?move_to=text&no_package=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "deleted": true,
  "moved": 1,
  "moved_to": "text",
  "name": "alice"
}
```

## Errors

- 400: --move-to and --no-package exclude each other
- 400: --name is required
- 400: <name> has an owner: move them to the administrator before changing their role
- 400: <name> is an administrator: administrators have no home, so nothing to back up
- 400: <name> is an administrator: administrators have no system account, so no shell
- 400: Cannot demote or suspend the last active administrator
- 400: Invalid boolean
- 400: Invalid email address
- 400: Invalid id
- 400: Invalid package name: letters, digits, spaces, dots, underscores and dashes, up to 64, starting with a letter or digit
- 400: Invalid password hash
- 400: Invalid password: 8 to 128 printable characters
- 400: Invalid role: admin, user or reseller
- 400: Invalid status
- 400: Invalid system password hash
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Only a customer has an owner: an administrator or a reseller is the administrator's own
- 400: Package '<name>' cannot be moved onto itself
- 400: The second factor can only be turned off here; a user enrols from their own page
- 400: Username '<value>' is reserved
- 401: Authentication required
- 403: The package <p.name> is the administrator's: a reseller changes their own
- 404: Package '<move_to>' not found
- 404: Package '<name>' not found
- 404: User '<name>' not found
- 409: <name> is on the package <p.name> of the reseller <p.owner>: change the package before the move
- 409: <name> owns <owned> 
- 409: <who> and its bandwidth for the month is used up: 
- 409: <who> and its disk is used up: 
- 409: Package '<name>' is the package of 
- 409: The package <p.name> allows <limit> 
- 409: The package <target.name> is 
