sky state public remove
Remove one public-state path idempotently.
Synopsis
bash
sky state public remove <path> --project <slug> [--env <slug>] [--expect-version <version>] [--comment <message>] [--yes] [--format <plain|json>]Description
remove deletes a single JSON Pointer path from the latest public state. If the path is already absent, the command succeeds without writing a new version.
Without --expect-version, the CLI fetches the current state first and can detect no-op removals locally. With --expect-version, it skips preflight and treats the API's missing-path validation as the same idempotent no-op.
Options
| Option | Description |
|---|---|
--project <slug> | Required. Project slug. |
--env <slug> | Target environment. Resolved from SKYSTATE_ENV or default_env when omitted. |
--expect-version <version> | Skip preflight GET and use this non-negative integer for If-Match. |
--comment <message> | Commit message for the new version. |
--yes | Skip the confirmation prompt. |
--format <format> | Global format, supported values for this command: plain, json. |
Examples
bash
sky state public remove /experiments/oldFlag --project my-app --env development
sky state public remove /banner/text --project my-app --env production --yes
sky state public remove /limits/maxItems --project my-app --env staging --expect-version 12 --format jsonOutput
Plain success output goes to stderr:
text
Removed
Environment development
Path /experiments/oldFlag
Operation remove
Version v9No-op plain output is:
text
Already absent: /experiments/oldFlagJSON no-op output is:
json
{
"version": null,
"path": "/experiments/oldFlag",
"op": "remove",
"noop": true
}