Skip to main content
Set the registry expiration policy. registry policy set configures the image expiration policy for your workspace’s Namespace Container Registry. By default, images stored in nscr.io never expire; once an image expires it can no longer be accessed and the underlying blobs are automatically deleted. With no --repository flag, the command updates the default policy that applies to every repository without a repository-specific override. Pass --repository to instead set (or override) the policy for that specific repository.

Usage

Example

Output
Set a repository-specific expiration:
Output
Set the default policy to never expire images:
Output

Options

—default_expiration <duration>

The expiration duration applied to new images (e.g., 168h for 7 days). Needs to be at least 4 hours.

—no-expiration

Set images to never expire. This overrides any previously configured expiration duration for the target policy (the default policy, or the repository given via --repository).

—repository <repository>

Set the policy for a specific repository. If not specified, sets the default policy that applies to all repositories without a repository-specific override.
Last modified on August 20, 2026