# How to Update microsandbox to the Latest Version: Complete CLI and SDK Upgrade Guide

> Easily update microsandbox to the latest version with our CLI and SDK upgrade guide. Learn to update the microsandbox binary and language SDKs quickly and efficiently.

- Repository: [Super Rad Company/microsandbox](https://github.com/superradcompany/microsandbox)
- Tags: migration-guide
- Published: 2026-08-20

---

**Run `msb update` (or `msb upgrade`) to update the microsandbox CLI binary and `libkrunfw` library, then update your language SDKs via their respective package managers.**

The **microsandbox** project ships a unified command-line tool called `msb` that manages the entire runtime. Keeping it current ensures you have the latest security patches, microVM features, and language SDK compatibility. This guide covers both host-side binary updates and SDK upgrades across all supported languages.

## Updating the `msb` CLI Binary

The self-update mechanism is implemented in [`crates/cli/lib/commands/self_cmd.rs`](https://github.com/superradcompany/microsandbox/blob/main/crates/cli/lib/commands/self_cmd.rs) within the `SelfCommand::Update` handler. This command queries the GitHub releases API, downloads platform-specific artifacts, and performs an atomic replacement of your existing installation.

### Basic Update Commands

```bash

# Preferred shorthand

msb update

# Equivalent alias

msb upgrade

# Force re-download even if already current

msb upgrade --force

```

The `--force` flag is useful when recovering from corrupted downloads or when verifying artifact integrity.

### What Happens During Update

According to the superradcompany/microsandbox source code, the update flow performs these steps:

1. **Version check** – Queries `api.github.com/repos/superradcompany/microsandbox/releases/latest`
2. **Artifact resolution** – Selects `msb` binary and `libkrunfw` archive matching your platform/architecture
3. **Atomic replacement** – Downloads to temporary location, then swaps executables
4. **Configuration preservation** – Existing config files in `~/.config/microsandbox/` remain untouched

### Verify the Update

```bash
msb --version

```

Compare the output against the [GitHub releases page](https://github.com/superradcompany/microsandbox/releases) to confirm you're running the latest version.

## Reinstalling via Install Script

If you originally installed via the one-liner script, you can re-run it for an equivalent result:

```bash

# macOS and Linux

curl -fsSL https://install.microsandbox.dev | sh

# Windows PowerShell

irm https://install.microsandbox.dev/windows | iex

```

The [`scripts/install.sh`](https://github.com/superradcompany/microsandbox/blob/main/scripts/install.sh) installation script ultimately invokes the same self-update routine as `msb upgrade`, making both approaches functionally identical.

## Updating Language SDKs

The CLI update only affects the host binary. Projects using microsandbox's language bindings require separate SDK updates. The SDKs are located in the `sdk/` directory of the repository and publish to their respective registries.

### Rust SDK

```bash

# Update in existing project

cargo update -p microsandbox

# Or explicitly add latest

cargo add microsandbox@latest

```

Source: Published to [crates.io/crates/microsandbox](https://crates.io/crates/microsandbox)

### Python SDK

```bash

# Using uv (recommended)

uv pip install -U microsandbox

# Or with pip

pip install -U microsandbox

```

Source: Published to [PyPI](https://pypi.org/project/microsandbox/)

### TypeScript SDK

```bash

# Update to latest

npm i microsandbox@latest

# Or update within semver range

npm update microsandbox

```

Source: Published to [npm](https://www.npmjs.com/package/microsandbox)

### Go SDK

```bash
go get -u github.com/superradcompany/microsandbox/sdk/go

```

Source: Module hosted at `github.com/superradcompany/microsandbox/sdk/go`

SDK README files in [`sdk/rust/README.md`](https://github.com/superradcompany/microsandbox/blob/main/sdk/rust/README.md), [`sdk/python/README.md`](https://github.com/superradcompany/microsandbox/blob/main/sdk/python/README.md), [`sdk/node-ts/README.md`](https://github.com/superradcompany/microsandbox/blob/main/sdk/node-ts/README.md), and [`sdk/go/README.md`](https://github.com/superradcompany/microsandbox/blob/main/sdk/go/README.md) contain version-specific installation details.

## Update Frequency and Compatibility

microsandbox follows semantic versioning. The CLI and SDK versions are decoupled—SDKs automatically download compatible runtime components on first use. However, running matching versions guarantees full feature support.

The top-level `msb update` and `msb upgrade` aliases were added in the July 2026 release, as documented in `docs/changelog/2026-07-10.mdx`. The CLI reference in `docs/cli/sandbox-commands.mdx` covers these commands under "Update msb and libkrunfw".

## Complete Update Workflow

```bash

# 1. Update host binary and runtime

msb upgrade

# 2. Verify installation

msb --version

# 3. Update project SDKs (example: Python with uv)

cd my-project
uv pip install -U microsandbox

# 4. Verify SDK recognizes new runtime

msb doctor  # if available, checks runtime linkage

```

## Summary

- **`msb update`** or **`msb upgrade`** updates the CLI binary and `libkrunfw` library atomically
- **`--force`** re-downloads even when versions match
- **SDK updates** require separate package manager commands per language
- **Install script re-runs** achieve the same result as self-update
- **Configuration persists** across all update methods

## Frequently Asked Questions

### What does `msb upgrade` actually download?

The command downloads two artifacts from GitHub releases: the `msb` binary for your platform and the matching `libkrunfw` firmware library. Both are replaced atomically to prevent runtime corruption.

### Can I downgrade to a previous version?

Yes. The `msb self` subcommand supports `downgrade` operations. Run `msb downgrade <version>` or consult `docs/cli/sandbox-commands.mdx` for version-specific syntax.

### Do I need to restart running sandboxes after updating?

Existing microVMs continue running on their launched runtime. New sandbox invocations automatically use the updated `msb` binary and `libkrunfw` versions.

### Why update SDKs separately from the CLI?

The SDKs provide language-specific APIs and type definitions. While they can auto-download compatible runtimes, updating ensures you have the latest API improvements, documentation, and static type definitions that match the CLI's capabilities.