Skip to main content
Run trunk upgrade to update the Trunk CLI and all your plugins, linters, tools, and runtimes.

Upgrade scopes

Upgrades can be filtered to different scopes by adding them to trunk upgrade <scopes>. The scopes available are:

Automatic upgrades

When running locally, Trunk automatically checks for upgrades in the background on a regular cadence. You’ll see notifications for these upgrades appear in the VSCode Extension or at the end of a trunk check run. To stop seeing these notifications, you can run trunk actions disable trunk-upgrade-available. When running in single-player mode, Trunk will automatically upgrade itself in the background and stay up to date.

Automatic upgrades with GitHub Actions

You can configure a GitHub workflow to create PRs with the latest Trunk and tool versions automatically. Here’s a sample GitHub Action:
Then, provide permissions for this GitHub Action to create and approve pull requests by navigating to your repo’s SettingsActionsGeneralWorkflow permissionsAllow GitHub Actions to create and approve pull requests.

You can also set the arguments field to filter particular scopes to upgrade and set base to define the branch to create a PR against (default main).
Triggering further workflow runsPRs created with this GitHub Action will not trigger further workflows by default. If you need the PRs created to trigger further GitHub Action Workflows, follow the workarounds described here.

Pinning versions

If you don’t want a linter, tool, or runtime to be upgraded, you can pin its version by appending ! to the version in your .trunk/trunk.yaml. For example:

Plugin repositories and user.yaml

By default, upgrades are only applied to your repo’s .trunk/trunk.yaml. If you’re using a plugin repo that enables linters/tools, or if you would like upgrades to be applied to your .trunk/user.yaml file, you can run trunk upgrade --apply-to <path> to see upgrades applied there.