> ## Documentation Index
> Fetch the complete documentation index at: https://namespace.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# nsc registry update-image-expiration

Update the expiration of an nscr.io image.

`nsc registry update-image-expiration` updates the expiration of a single image that is stored in nscr.io. Once an image expires it can no longer be accessed and the underlying blobs are automatically deleted.
It is not possible to change the expiration of an image that already expired.

## Usage

```bash theme={null}
nsc registry update-image-expiration [image-reference] [--digest <digest>] [--ensure-minimum <duration>] [--expire-at <timestamp>] [--output, -o <format>] [--repository <name>]
```

### Examples

```sh theme={null}
nsc registry update-image-expiration testing/backend@sha256:b493d48364afe44d11c0165cf470a4164d1e2609911ef998be868d46ade3de4e --ensure-minimum=5h

Ensuring expiry is at least: 5h0m0s

Repository:   testing/backend
Digest:       sha256:b493d48364afe44d11c0165cf470a4164d1e2609911ef998be868d46ade3de4e
New Expiry:   2025-12-15T21:25:10Z

Image expiry updated successfully.
```

```sh theme={null}
nsc registry update-image-expiration testing/backend@sha256:b493d48364afe44d11c0165cf470a4164d1e2609911ef998be868d46ade3de4e --expire-at=2025-12-16T21:25:10Z

Setting expiry to: 2025-12-16T21:25:10Z

Repository:   testing/backend
Digest:       sha256:b493d48364afe44d11c0165cf470a4164d1e2609911ef998be868d46ade3de4e
New Expiry:   2025-12-16T21:25:10Z

Image expiry updated successfully.
```

## Options

<h3 id="--digest-digest">
  \--digest \<digest>
</h3>

The digest of the image to update, used together with `--repository` as an alternative to providing the image reference as a positional argument.

<h3 id="--ensure-minimum-duration">
  \--ensure-minimum \<duration>
</h3>

How long the image should be available at least. If there's currently an expiration set after the provided duration then the command will not do any change.
The duration is specified as a string and valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

<h3 id="--expire-at-timestamp">
  \--expire-at \<timestamp>
</h3>

When the image should expire. This overwrites any previously configured expiration.

<h3 id="--output--o-format">
  \--output, -o \<format>
</h3>

Output format. One of `table` or `json`. Default is `table`.

<h3 id="--repository-name">
  \--repository \<name>
</h3>

The repository name of the image to update, used together with `--digest` as an alternative to providing the image reference as a positional argument.
