Bun upgrades itself with the built-in bun upgrade command.
bun upgrade
bun upgrade downloads and installs the latest aphrody-v* release of aphrody-labs/bun, replacing the currently installed version.
To see the current version of Bun, run bun --version.
Verify the upgrade
After upgrading, verify the new version:
bun --version
# Output: 1.x.y-aphrody.n
# See the exact commit of the Bun binary
bun --revision
# Output: 1.x.y-aphrody.n+abc123def
Upgrade to canary builds
bun upgrade --canary installs the release tagged canary. aphrody-labs/bun does not publish one at the moment, so the command reports that no canary build exists.
bun upgrade --canary
Canary builds are not recommended for production use. They may contain bugs or breaking changes.
Switch back to stable
If you're on a canary build and want to return to the latest stable release:
bun upgrade --stable
Install a specific version
To install a specific version, pass an upstream base version (the newest aphrody.<n> release of that base) or an exact release tag to the install script:
</Tab>
<Tab title="Windows">
```powershell PowerShell icon="windows" & ([scriptblock]::Create((irm https://bun.aphrody.com/install.ps1))) -Version
aphrody-v1.4.3-aphrody.2 ```
</Tab>
</Tabs>
---
## Package manager users
If you installed Bun with a package manager, upgrade with that package manager instead of `bun upgrade` to avoid conflicts.
<Tip>
**Homebrew users** <br />
Use `brew upgrade bun` instead.
**Scoop users** <br />
Use `scoop update bun` instead.
</Tip>
---
## See also
- [Installation](/installation) — Install Bun for the first time
- [Update packages](/pm/cli/update) — Update dependencies to latest versions
</div>
</div>