Get your free beta license ↗
API operation · users group
DELETE

/packages/{name}

First published 3 Oct 20260.1.0Unchanged since publication

Delete a hosting package

Who may call it
AdministratorResellerCustomer
Token scope, any of
usersall
Answers200 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

Run as root on the server

Parameters

namepath ·PackageNameRequired
move_toquery ·PackageName
Name of another package with the same owner to which the customers will be moved.
no_packagequery ·boolean
Set to true to remove the customers' package assignments and all package limits.

Example

See the API overview for how to set $API and $TOKEN.
Request
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

32 errors, each a status and a sentence
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
400Cannot demote or suspend the last active administrator
400Invalid boolean
400Invalid email address
400Invalid id
400Invalid package name: letters, digits, spaces, dots, underscores and dashes, up to 64, starting with a letter or digit
400Invalid password hash
400Invalid password: 8 to 128 printable characters
400Invalid role: admin, user or reseller
400Invalid status
400Invalid system password hash
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Only a customer has an owner: an administrator or a reseller is the administrator's own
400Package '<name>' cannot be moved onto itself
400The second factor can only be turned off here; a user enrols from their own page
400Username '<value>' is reserved
401Authentication required
403The package <p.name> is the administrator's: a reseller changes their own
404Package '<move_to>' not found
404Package '<name>' not found
404User '<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:
409Package '<name>' is the package of
409The package <p.name> allows <limit>
409The package <target.name> is
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/delete-packages-name/