How to ensure sandboxes use the latest deployed image

Last updated: March 24, 2026

When deploying new images to Blaxel, you may want to ensure that your sandboxes always pick up the latest version with updated packages and dependencies, rather than continuing to use older image versions.

Using the :latest tag

To ensure your sandboxes always use the most recent deployed image, you can use the :latest tag when creating sandboxes from your sandbox template image. This is the default if no tag is specified and it automatically references the most recently deployed version of your image.

When you create a new sandbox using :latest, it will automatically use the newest image version available, ensuring you have the right packages and latest updates.

Managing existing sandboxes

Important to note: when you deploy a new image using bl deploy, existing sandboxes based on older images will continue running unless you explicitly delete them. They don't automatically update to use the new image.

If you want all sandboxes to use the latest image version, you'll need to:

  1. Delete existing sandboxes that are using older image versions

  2. Create new sandboxes using the :latest tag

You can also use the UpdateSandbox API (PUT /sandboxes/{sandboxName}) to update a sandbox's image in-place. This resets the sandbox state.

If you use createIfNotExists() / create_if_not_exists(), an existing sandbox with the same name will be returned as-is, without picking up the new image. To force a fresh image, either delete the sandbox first or use the UpdateSandbox API.

Sandbox persistence vs. fresh images

Unlike other sandbox providers, Blaxel sandboxes can be kept in standby indefinitely. They resume in under 25ms and allow you to persist state between sessions. However, if your priority is ensuring fresh images with the latest packages rather than cost savings or state persistence, regularly cycling your sandboxes to use the :latest tag is the recommended approach.

For more guidance on managing sandboxes effectively, check out the sandbox best practices documentation.