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
2.
# Preview only; expected exit 2.
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 a raw object on stdout:
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
{"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 | Preview only because --yes was absent, or a flag value could not be parsed. |
A missing required --project currently exits 1. JSON preview output can be
valid even though the intentional preview exit is 2; check both streams 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.