Installing and Updating Packages
This chapter covers the commands you will use most often after discovering a
package: install and update.
In the examples below, replace placeholders such as <package-name>,
<version>, and <registry-id> with real values.
Install packages from package registries
Install a package by name:
foton install <package-name>
Install multiple packages at once:
foton install <package-name-1> <package-name-2>
Install a specific version:
foton install <package-name>@<version>
By default, foton resolves packages from the package registries enabled in
your configuration.
To resolve packages only from specific package registries, pass --registry.
foton install --registry <registry-id-1>,<registry-id-2> <package-name>
Install without activating immediately
By default, install activates the selected packages after they are installed.
If you only want to download and record the package first, pass
--no-activate.
foton install --no-activate <package-name>
You can activate the package later with foton activate.
Update installed packages
Update installed packages when newer versions are available:
foton update
Update only selected packages:
foton update <package-name-1> <package-name-2>
Updating a package installs the newer version without automatically removing older installed versions.
If you want to control which package registries are used to find updates, pass
--registry.
foton update --registry <registry-id-1>,<registry-id-2> <package-name>
Confirmation prompts
Commands that change installed packages ask for confirmation before applying
changes.
If you want to skip the prompt, pass the global --no-confirm option.
foton --no-confirm install <package-name>
foton --no-confirm update
Notes
- If an install or update does not complete cleanly, use
foton repairto clean up any packages left behind. - See the command reference for additional options and details.