Skip to main content
Delete a drive when no sandbox needs its files anymore. Set up your SDK or the CLI before running these examples.
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.

Delete a drive

Deleting a drive permanently deletes every file on it, for every sandbox that uses it. You can’t undo it.
Before you delete a drive, unmount it from every sandbox that has it mounted. Deletion continues after the call returns, and the drive’s status is DELETING until it’s gone. To delete the drive named shared-notes:
Run the following code:
The SDK examples print DELETING. To confirm the drive is gone, list your drives.

Next steps

List drives

Check which drives your team still has.

Create a drive

Create a new drive.