3.0.0-beta.15). Features may change before the next stable release.Switch to stable →ak content-search
ak content-search delete
Preview and irreversibly remove one AgentKit-owned plaintext content-search shard.
Use ak content-search delete when a project owner wants to remove one
project's derived search shard permanently. Runtime source files and
operational.db remain outside the deletion boundary.
Usage
ak content-search delete --project <uuid>The command accepts no documented positional arguments.
Flags and confirmation
| Flag | Default | Description |
|---|---|---|
--project <uuid> | Empty, required | Canonical lowercase project UUIDv7. |
--yes | false | Apply the plan built during this invocation. |
There is no TTY prompt and stdin is not read. --no-interactive does not
authorize deletion. Without --yes, the command prints a preview and exits
3.
# Preview only; expected exit 3.
ak content-search delete --project <uuid> --json
# Apply intentionally.
ak content-search delete --project <uuid> --yes --no-interactive --jsonRead the preview
JSON preview output is the shared success envelope with kind
content_search.delete_plan on stdout. Its data fields are:
planId: random plan token for this process
projectId: canonical project UUID
documentCount: indexed document count
logicalBytes: title-plus-body length counter reported by SQLite
generation: shard generation checked again before delete
createdAt: UTC timestampThe preview token is held only for the current process. With --yes, the same
invocation revalidates the generation and removes the project's .db, WAL,
SHM, journal, and lifecycle marker. JSON apply output is a
content_search.delete envelope whose data is
{"projectId":"<uuid>","deleted":"true"}; deleted is a string, not a
boolean. Human output is deleted.
Apply creates no backup or recovery snapshot. A stale generation refuses the operation, but a successful delete is irreversible from AgentKit's content-search lifecycle commands.
The operation is local and owner-authorized. It performs no registry, provider, authentication, entitlement, or network request.
Exit behavior
| Exit | Meaning |
|---|---|
0 | The shard files were removed or were already absent as sidecars during the applied removal. |
1 | Owner resolution, project validation, operational-store access, shard inspection, generation revalidation, or file removal failed. |
2 | A flag value could not be parsed. |
3 | Preview only: the plan was printed and nothing was deleted. Rerun with --yes to apply. |
A missing required --project currently exits 1. A preview is a completed
result, not an error: the plan is on stdout and no error envelope follows on
stderr, even though the process exits 3. Check both the output and the
process status.
Verify and recover
ak content-search status --project <uuid> --jsonA successful delete should report lifecycle=absent and health=absent.
Re-enable to create an empty shard; the original runtime sources are still
present, but repopulation requires an indexing path.