Deleting an unused Kibana space prevents stale dashboards, data views, and alerts from lingering and turning the stack into a well-decorated junk drawer.

Kibana spaces separate saved objects by space id while sharing the same backend. The Spaces API exposes endpoints to list spaces (GET /api/spaces/space) and remove a specific space (DELETE /api/spaces/space/{id}) over HTTP with standard authentication.

Space deletion is permanent and removes all saved objects in that space. The reserved default space cannot be deleted, and a reverse proxy server.basePath changes the request URL path by adding the base path prefix.

Steps to delete a Kibana space:

  1. List spaces to identify the target space id.
    $ curl --silent --user elastic:password --request GET \
      --header "kbn-xsrf: true" \
      "http://localhost:5601/api/spaces/space"
    [
      {
        "id": "default",
        "name": "Default",
        "_reserved": true,
        "description": "This is the Default Space",
        "disabledFeatures": []
      },
      {
        "id": "ops",
        "name": "Operations",
        "description": "Operations dashboards and alerts",
        "disabledFeatures": []
      }
    ]

    When Kibana is served from a base path (server.basePath), prefix the URL path (example: https://kibana.example.net/kibana/api/spaces/space).

  2. Confirm the target space is not marked as "_reserved": true.

    Reserved spaces such as default are not deletable.

  3. Delete the space using its id.
    $ curl --silent --show-error --fail --user elastic:password --request DELETE \
      --header "kbn-xsrf: true" \
      --output /dev/null \
      --write-out "%{http_code}\n" \
      "http://localhost:5601/api/spaces/space/ops"
    204

    Deletion removes all saved objects in the space and cannot be undone.

  4. Verify the space no longer appears in the space list.
    $ curl --silent --user elastic:password --request GET \
      --header "kbn-xsrf: true" \
      "http://localhost:5601/api/spaces/space"
    [
      {
        "id": "default",
        "name": "Default",
        "_reserved": true,
        "description": "This is the Default Space",
        "disabledFeatures": []
      }
    ]