# How to upgrade the Trigger.dev packages

> Source: https://trigger.dev/docs/upgrading-packages

[​](https://trigger.dev/docs/upgrading-packages#update-command)

Update command
---------------------------------------------------------------------------------

Run this command in your project:

    npx trigger.dev@latest update
    

This will update all of the Trigger.dev packages in your project to the latest version.

[​](https://trigger.dev/docs/upgrading-packages#running-the-cli-locally)

Running the CLI locally
---------------------------------------------------------------------------------------------------

When you run the CLI locally use the latest version for the `dev` and `deploy` commands:

    npx trigger.dev@latest dev
    

    npx trigger.dev@latest deploy
    

These commands will also give you the option to upgrade if you are behind on versions.

[​](https://trigger.dev/docs/upgrading-packages#deploying-with-github-actions)

Deploying with GitHub Actions
---------------------------------------------------------------------------------------------------------------

You can deploy using [GitHub Actions](https://trigger.dev/docs/github-actions)
. We recommend that you lock your version in the workflow file so make sure to upgrade.

The deploy step will fail if version mismatches are detected. It’s important that you update the version using the steps below.

1

[](https://trigger.dev/docs/upgrading-packages#)

Find your workflow file

In your `.githubs/workflows` folder you can find your workflow yml files. You may have a prod and staging one.

2

[](https://trigger.dev/docs/upgrading-packages#)

Update the version for the run command

In the steps you’ll see a `run` command. It will run the trigger.dev deploy CLI command. Make sure to update this version to the latest version (e.g. `npx trigger.dev@3.0.0 deploy`).

[​](https://trigger.dev/docs/upgrading-packages#package-json-dev-dependency)

package.json dev dependency
-----------------------------------------------------------------------------------------------------------

Instead of using `npx`, `pnpm dlx` or `yarn dlx` you can add the Trigger.dev CLI as a dev dependency to your package.json file. For example:

    {
      "devDependencies": {
        "trigger.dev": "3.0.0"
      }
    }
    

If you’ve done this make sure to update the version to match the `@trigger.dev/sdk` package. Once you have added the `trigger.dev` package to your `devDependencies`, you can use `npm exec trigger.dev`, `pnpm exec trigger.dev`, or `yarn exec trigger.dev` to run the CLI. But we recommend adding your dev and deploy commands to the `scripts` section of your `package.json` file:

    {
      "scripts": {
        "dev:trigger": "trigger dev",
        "deploy:trigger": "trigger deploy"
      }
    }
    

Then you can run `npm run dev:trigger` and `npm run deploy:trigger` to run the CLI.

Was this page helpful?

YesNo

[Previous](https://trigger.dev/docs/troubleshooting-debugging-in-vscode)
[Uptime StatusSubscribe to email notifications for Trigger.dev platform incidents and status updates.\
\
Next](https://trigger.dev/docs/troubleshooting-uptime-status)

Ctrl+I

Assistant

Responses are generated using AI and may contain mistakes.
