# atmos plugin update

Explicitly advance selected release versions and update their lock entries.

> ⚠️ Experimental

## Usage

```shell
atmos plugin update [alias]
atmos plugin update <alias> --version=<constraint>
```

Without `--version`, `update` re-resolves each declared package within its existing constraint and
rewrites only the lock. For each package it reports one of:

- `Plugin <alias> is already up to date` when the newest matching release is the locked one.
- `Updated plugin <alias> from <old> to <new>` when a newer matching release was selected.

An exact version such as `1.2.3` is never advanced; a range such as `^1.2.0` moves to the latest
matching stable release. Pre-releases are selected only when the constraint names a pre-release.
The lock changes only after every selected package installs successfully, and `enabled: false`
packages are skipped.

With `--version`, `update` changes the constraint for one package. It edits the `version` of that
package under `plugins.packages` in `atmos.yaml` (leaving comments and unrelated settings alone)
and the lock together, in one transaction. The alias is required, and it must already be declared;
use [`plugin install`](install.mdx) to add a new package.

## Arguments and flags

- **alias**
  Package alias to update. Omit to update every declared package. Required with 
  \--version
  .
  Run 
  atmos plugin list
   to see the aliases.
- **--version**
  Replace this package's version constraint in 
  atmos.yaml
   and re-resolve the lock against it.
  Needs an alias.

## Examples

```shell
atmos plugin update
atmos plugin update corporate
atmos plugin update corporate --version='^0.2'
```
