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

# flox upgrade

## NAME

flox-upgrade - upgrade packages in an environment

## SYNOPSIS

```text theme={null}
flox [<general-options>] upgrade
     [-d=<path> | -r=<owner>/<name>]
     [--dry-run]
     [<package or pkg-group>]...
```

## DESCRIPTION

Upgrade packages in the environment.

When no arguments are specified, all packages in the environment are
upgraded if possible. A package is upgraded if its version, build
configuration, or dependency graph changes.

Packages to upgrade can be specified by group name. Packages without a
specified pkg-group in the manifest are placed in a group named
‘toplevel’. The packages in that group can be upgraded without updating
any other groups by passing ‘toplevel’ as the group name.

A single package can only be specified to upgrade by ID if it is not in
a group with any other packages.

See [`manifest.toml`](/man/manifest.toml) for more on using
pkg-groups.

## OPTIONS

### Upgrade Options

`--dry-run`\
Show available upgrades but do not apply them.

`<package or pkg-group>`\
Install ID or pkg-group to upgrade.

### Environment Options

If no environment is specified for an environment command, the
environment in the current directory or the active environment that was
last activated is used.

`-d`, `--dir`\
Path containing a .flox/ directory.

`-r`, `--reference`\
A FloxHub environment, specified in the form `<owner>/<name>`.

`-D`, `--default`\
Use your default environment (`<your-user>/default`). When
unauthenticated in an interactive context, you will be prompted to log
in. In non-interactive contexts (e.g., scripts or CI), this flag will
fail with an error when authentication is missing.

### General Options

`-h`, `--help`\
Prints help information.

The following options can be passed when running any `flox` subcommand
but must be specified *before* the subcommand.

`-v`, `--verbose`\
Increase logging verbosity. Invoke multiple times for increasing detail.

`-q`, `--quiet`\
Silence logs except for errors.

## SEE ALSO

[`manifest.toml`](/man/manifest.toml)
