# Two plugins upgrade the same file

What "both upgrade" means in axle migrate --upgrade and how to fix it.

```text
error: the plugins next and team-codemods both upgrade apps/web/package.json
hint: Leave one of them out of [plugins] in axle.toml while you run axle migrate --upgrade, then put it back and run it again. Nothing was changed.
```

## Why it happens

[`axle migrate --upgrade`](https://axlers.dev/docs/reference/migrate.md#upgrading-tools) asks every plugin that can `upgrade` for the files it would change, all at once, before writing any. Each plugin reads the files as they are on disk, so when two of them change the same file, whichever was written last would undo the other's changes. Axle writes nothing.

## How to fix it

Upgrade with one plugin at a time. Remove the other's table from `[plugins]` in `axle.toml`, run `axle migrate --upgrade`, put the table back and run it again: the second plugin then starts from the first one's changes.
