---
title: How to install system packages in Vercel Sandbox
description: Learn how to install additional system packages in Vercel Sandbox using dnf, the package manager for Amazon Linux 2023.
url: /kb/guide/how-to-install-system-packages-in-vercel-sandbox
canonical_url: "https://vercel.com/kb/guide/how-to-install-system-packages-in-vercel-sandbox"
published: 2026-01-29
last_updated: 2026-04-15
authors: Amy Burns
related:
  - /docs/vercel-sandbox/system-specifications
  - /docs/vercel-sandbox/sdk-reference
  - /docs/vercel-sandbox/concepts/snapshots
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Concepts](https://vercel.com/docs/sandbox/concepts?from=related) — Learn how Vercel Sandboxes provide on-demand, isolated compute environments for running untrusted code, testing applicat
- [Runtimes](https://vercel.com/docs/sandbox/concepts/runtimes?from=related) — Detailed specifications for the Vercel Sandbox environment.
- [JS SDK Reference](https://vercel.com/docs/sandbox/sdk-reference?from=related) — A comprehensive reference for the Vercel Sandbox JavaScript SDK, which lets you run code in a secure, isolated environme
- [Sandbox](https://vercel.com/docs/sandbox?from=related) — Vercel Sandbox allows you to run arbitrary code in isolated, ephemeral Linux VMs.
- [Run Commands in Vercel Sandbox](https://vercel.com/docs/sandbox/run-commands-in-sandbox?from=related) — Create isolated sandbox environments to run builds, tests, and commands safely.
- [Using private GitHub repositories with Vercel Sandbox](https://vercel.com/kb/guide/sandbox-private-github-repositories?from=related) — Learn how to use Vercel Sandbox with private GitHub repositories using fine-grained tokens, classic tokens, or GitHub Ap
- [How to use snapshots for faster sandbox startup](https://vercel.com/kb/guide/how-to-use-snapshots-for-faster-sandbox-startup?from=related) — Learn how to save sandbox state with snapshots and skip installation on future runs.

Full cross-link map for this page: [/kb/guide/how-to-install-system-packages-in-vercel-sandbox.graph.md](/kb/guide/how-to-install-system-packages-in-vercel-sandbox.graph.md)
<!-- /docsgraph:related -->


The sandbox comes with a base set of tools pre-installed, including Node.js, Python, Git, and common utilities. You can see the full list in the [System Specifications](https://vercel.com/docs/vercel-sandbox/system-specifications) docs. When your use case requires something beyond the defaults, you can install it yourself using `dnf` on the `RunCommand` method.

The sandbox runs Amazon Linux 2023, so you’ll install packages using `dnf`, the system's package manager. Any command that modifies system packages needs root privileges, which you can enable by setting `sudo: true`.   

## Install packages with TypeScript

In this example, we’ll install Go using TypeScript and the [Sandbox](https://vercel.com/docs/vercel-sandbox/sdk-reference#sandbox.runcommand) `runCommand`:

```typescript
import { Sandbox } from '@vercel/sandbox';

const sandbox = await Sandbox.create();

await sandbox.runCommand({
  cmd: 'dnf',
  args: ['install', '-y', 'golang'],
  sudo: true,
});
```

You’ll pass any arguments and flags that you normally would. For example, the `-y` flag automatically confirms the installation prompt.                                                                                                    

## Install packages with Python

And in Python:

```typescript
from vercel.sandbox import Sandbox

sandbox = Sandbox.create()

sandbox.run_command(
  'dnf',
  ['install', '-y', 'golang'],
  sudo=True,
)
```

Set `sudo: true` because package installation requires root privileges.

## Persistence

Packages you install don't persist between sessions. When a sandbox shuts down, any packages you added are lost. If you're setting up an environment you want to reuse, install your packages and then [create a snapshot](https://vercel.com/docs/vercel-sandbox/concepts/snapshots#create-a-snapshot) of the sandbox. When you create a new sandbox from that snapshot, your packages will already be there.    

## Available packages

The sandbox runs Amazon Linux 2023. Check the [Amazon Linux 2023 package list](https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.7.html) to see what's available.

Common examples include:

- \*\*Language runtimes: \*\*`golang, rust, ruby`
  
- \*\*Build tools: \*\*`make, cmake, gcc`
  
- \*\*Utilities: \*\*`jq, htop, tmux`