Skip to content
Français

removePodmanSandbox

import { removePodmanSandbox } from "@elie-laloum/outpost/providers/podman";

Remove a Podman sandbox and its egress companion by name, whatever the repositoryMode of the provider that created it. Containers already gone are ignored, so repeating the call succeeds. A name other than outpost-<uuid> is refused with code configuration before any podman command. The container is removed even while a lease still uses it; that lease’s later commands fail and its release remains safe.

Complete example and detailed rules.

  • nameRequired
    string
    Sandbox name, as reported by listPodmanSandboxes or received by SandboxContext.registerRecovery.
  • optionsOptional
    TransferOptions | undefined
    Cancellation signal and deadline applied to each podman command of the removal.
  • options.signalOptional
    AbortSignal | undefined
    Cooperative cancellation of the removal; aborting stops the running podman command and rejects.
  • options.deadlineMsOptional
    number | undefined
    Maximum duration in milliseconds of each podman command of the removal, default 10000; past it the removal rejects with code timeout.

Promise<void>

export declare const removePodmanSandbox: (
  name: string,
  options?: TransferOptions,
) => Promise<void>;