Skip to main content
Unmount a drive when a sandbox no longer needs it. The drive and its files stay, and other sandboxes keep their mounts. Set up your SDK or the CLI before running these examples. They use a sandbox named hello-world with a drive mounted at /mnt/notes, as in Mount a drive.
Drives are in pre-release in the Baseten CLI (baseten drive and baseten sandbox drive) and in the Python, TypeScript, and Go SDKs (baseten, @basetenlabs/client, @basetenlabs/sandbox, and baseten-go). Commands, methods, and responses can change. The Management API drive operations are experimental.

Unmount a drive

Identify the mount by its mount path. To find it, list the sandbox’s drive mounts. To unmount the drive at /mnt/notes:
Run the following code:
To confirm, list the sandbox’s drive mounts. The mount no longer appears.

Next steps

Delete a drive

Permanently remove a drive and its files.

Mount a drive

Mount the drive again in this sandbox or another one.