all postsblog / security & isolation

blog

Top 10 Ephemeral Development Environment Platforms in 2026: What Delete Leaves Behind

written by
Ajay Kumar
published
reading time
11 min read
topics

Every platform in this category has a big friendly button labelled delete, and every one of them means something slightly different by it. On one it removes a container and keeps the volume for a week. On another it destroys the VM and leaves the DNS record, the cloud database the environment provisioned, and the API token you minted into it. On a third there is nothing to delete, because the environment was a browser tab, and the residue is a cache entry in somebody's IndexedDB.

The previous roundups in this series graded the front half of the lifecycle and the middle: who calls create, how fast it is, what idle costs, how slow the resume path is. This one grades the end. The question is narrow and boring and it is the one that shows up in the security review and the cloud bill three months later: after you delete an ephemeral environment, on purpose, through the supported path, what is still there?

I build one of the ten -- PandaStack -- and I will mark it as such and list what our delete does not delete, which is more than nothing.

The short version. Teardown residue comes in six classes: compute, disk and snapshots, network identity, credentials, sidecar data, and host-level traces. A platform's delete usually handles the first two well and the last four badly or not at all, because the last four live in systems the environment platform does not own -- your DNS, your secrets manager, your database service, a shared kernel. The single best predictor of a clean teardown is how few of those external systems the environment had to touch to exist. The second best is the isolation boundary, because that decides whether host-level traces can exist at all.

The six things an environment leaves behind

Before the list, the inventory. This is the checklist I run against any platform, and it is deliberately written in terms of what survives rather than what the docs say is removed:

  1. Compute. A process, container, pod or VM still running or still allocated. This is the one every platform handles, and the one nobody needs a blog post about -- except when delete is asynchronous, returns 200 immediately, and the thing keeps billing for a while because the reaper is behind.
  2. Disk and snapshots. The volume, the persistent home directory, the prebuild, the checkpoint, the snapshot you took for a fork or a resume. Volumes are often kept on purpose (a retention window, so a mistaken delete is recoverable). Snapshots are worse: they are a separate object with a separate lifecycle, and a memory snapshot is a frozen copy of everything that was in RAM, including the secrets the process had loaded.
  3. Network identity. The preview URL, the DNS record, the ingress rule, the forwarded port, the IP address. A URL that outlives its environment is mostly harmless; a URL that gets reassigned to the next environment while somebody still has it bookmarked is a data-exposure bug wearing a hostname.
  4. Credentials. Every token the environment was given: the git credential used to clone, the cloud role it assumed, the registry pull secret, the API key someone pasted into a terminal. Deleting the environment deletes the copy. It does not revoke the credential, and a credential that was short-lived on paper is often not short-lived in practice.
  5. Sidecar data. The database, queue, bucket or cache that was created for this environment and lives in another service. This is where most of the long-tail cost hides, because the environment platform has no idea the database exists, and the database service has no idea it belonged to an environment.
  6. Host-level traces. Anything left on the machine the environment ran on that another tenant could, in principle, observe: shared image-layer and package caches, a shared container daemon's state, kernel objects, page cache. The isolation boundary decides whether this class is a theoretical concern or a real one.
Ephemeral describes the thing you created. It says nothing about the six things your thing created.

The grading that follows is per platform, on what its own supported delete removes by default, what it deliberately keeps, and where orphans tend to accumulate. Behaviour for every non-PandaStack entry is described qualitatively from public documentation and architecture; retention windows, defaults and feature names change often in this category, so verify each one against the vendor's current docs before you rely on it.

The ten, ordered by how little a delete leaves behind

The order is not a quality ranking. A platform low on this list can be the right answer -- several of them keep things on purpose, because a developer's half-finished branch is worth more than a tidy teardown. The order is how clean the default supported delete is, for an environment someone created through the platform's normal path.

1. StackBlitz / WebContainers

The cleanest teardown in the category, for the least interesting reason: there was nothing on a server to tear down. The runtime is WASM in a browser tab, so compute, host traces and most network identity vanish when the tab does. Residue is the project if you saved it, whatever the browser kept in local storage, and any credential you typed into the in-browser terminal, which now lives in the same place as the rest of that browser's state. The catch is the same one every roundup lists: no real kernel, no native toolchains, no database that is not itself a WASM build or a remote service -- and the moment you point the environment at a remote service, that service's teardown becomes your problem again. Verify the current storage and persistence behaviour in their docs.

2. PandaStack (the one I build)

Each environment is a Firecracker microVM with its own guest kernel, restored from a baked template snapshot, with its own network namespace and TAP device and a copy-on-write rootfs (an XFS reflink or dm-snapshot of the template disk). sbx.kill() -- or leaving a with Sandbox.create(...) block, which calls it for non-persistent sandboxes -- removes the VM, its CoW disk layer, its network slot and with them its preview URL. The URL is https://<port>-<id>.<suffix> and the sandbox UUID is the credential, so a dead sandbox's URL points at nothing rather than at somebody else. Host-level traces are bounded by the boundary: guests do not share a kernel or a container daemon, and the only thing shared with other guests is the read-only template disk and template memory image, both copy-on-write.

What our delete does not delete, plainly:

  • Snapshots. sbx.snapshot() creates an object that outlives the sandbox on purpose -- that is what it is for. It contains the guest's memory at the moment you took it, which means any secret the process had loaded. An explicit kill() cascade-deletes the sandbox's snapshots, but the idle reaper deliberately does not: a sandbox reaped for idleness leaves its snapshots behind (a later grace-period sweep expires orphans), and client.snapshots.delete(id) is how you remove one yourself. If your environments snapshot for forks or for later inspection, that is a lifecycle you own.
  • Databases. A managed Postgres is its own microVM with its own durable volume and its own delete (client.databases.delete(id), irreversible). Killing the sandbox that used it does nothing to it. There is no built-in notion of an environment that groups a sandbox, a database and a set of snapshots and deletes them together -- you write that, and the code sample below is what it looks like.
  • Volumes. Same story: client.volumes objects persist until you delete them, and a delete is refused while the volume is attached to a running sandbox.
  • Persistent sandboxes. A sandbox created with persistent=True is exempt from the idle reaper by design. One that was created that way and forgotten is not ephemeral in any sense, and the context manager will not kill it for you.
  • The idle clock. ttl_seconds is an idle timeout that activity resets, not a hard lifetime. A forgotten environment that something keeps poking -- a health check, a monitoring tab, a bot -- stays alive. If you need a wall-clock limit, enforce it in your own sweeper.
  • Credentials you put in. We do not mint cloud or git credentials into a plain sandbox for you, which also means we do not revoke them. Anything you injected is yours to make short-lived.

Weaker spots compared with the rest of this list: no browser IDE and no devcontainer-driven workspace experience -- you bring an editor over SSH or drive it as an API -- and no environment-level grouping object. If what you want is a developer workspace with retention and a recycle bin, the cohort further down does that and we do not. The mechanics of the idle clock are covered in How to control sandbox lifetime: TTL, idle, and cleanup.

3. E2B

A sandbox API built on Firecracker microVMs, so the boundary story is the same shape as ours: per-sandbox kernel, nothing like a shared daemon to leave traces in. Kill tears down the VM. The residue questions are the usual API-platform ones -- whether you used any persistence or pause feature that keeps state beyond the sandbox, what the default timeout is and whether it is idle or wall-clock, and what happens to anything the sandbox created outside itself. Verify the current persistence, pause and timeout semantics in their docs; they have changed over time.

4. Modal sandboxes

Sandboxes run under gVisor, a user-space kernel that intercepts syscalls, which is a different boundary from a hardware VM but still a much smaller shared surface than a plain container. Terminating a sandbox removes the compute. Modal's surrounding objects -- volumes, secrets, images, apps -- are first-class, named and long-lived by design, which is excellent for reuse and means a teardown is only as complete as the objects you remembered to delete or never named in the first place. Verify the current object lifecycles and default timeouts in their docs.

5. Daytona

Started as a dev-environment manager and moved toward a sandbox API for agents. The lifecycle has more states than create and delete -- stopped and archived among them, with automatic transitions -- which is exactly the shape where teardown residue lives: a stopped or archived sandbox has given up its compute and kept its disk. The delete is clean; the states before delete are where things accumulate. Check which isolation runtime your deployment uses, and the current auto-stop, auto-archive and auto-delete defaults, in their docs.

6. GitHub Codespaces

Delete removes the codespace and its disk; the inactivity path stops it and keeps the disk, and a retention period eventually deletes stopped ones. That is a good default for humans and leaves two kinds of residue worth knowing about. Credentials: a codespace gets a scoped token for its repository, and Codespaces secrets are defined at the user, repo or org level, so deleting the codespace removes the copy and never the secret -- which is the right design, as long as you know it. Network identity: forwarded ports can be made visible beyond the owner, and that visibility should die with the codespace, which is worth testing rather than assuming. Host traces depend on the underlying VM model, which is a VM per codespace rather than a shared container host. Verify retention, timeout and port-visibility defaults in GitHub's current docs.

7. Gitpod / Ona

The newer runner model puts workspaces in your own cloud account, which is good for data residency and moves teardown into your account's bookkeeping. A workspace delete should remove the instance and its disk; anything the runner itself provisioned -- networking, load balancers, roles, storage for workspace content -- is infrastructure you now operate, and a runner that was misconfigured or removed uncleanly leaves cloud resources that the product no longer knows about. Verify current retention behaviour and exactly what the runner creates in their docs, then audit your account for it.

8. Okteto

Preview and dev environments are Kubernetes namespaces, and namespace deletion cascades to every namespaced object -- pods, services, ingresses, secrets, PVC objects. That is a strong teardown primitive. Residue shows up at the edges: persistent volumes whose reclaim policy is Retain, external DNS records created by a controller that is slow to notice, cloud resources created by Terraform or a cloud operator from inside the pipeline, and anything cluster-scoped. Host traces are a property of your cluster: pods share a node kernel unless you add a sandboxed runtime. Verify how their current product handles external resources and volume cleanup.

9. Coder

Coder's delete is a Terraform destroy of the workspace's template, which is simultaneously the most powerful teardown here and the one with the most ways to leave things behind. Whatever is in Terraform state is destroyed. Whatever the template marks as persistent -- a home volume is the common case -- is kept by design. Whatever a startup script created out of band, a prevent_destroy lifecycle flag protected, or a failed destroy left half-applied, survives until someone reads the state. The upside is total control and the entire residue model is in a file you can review. The downside is that it is your file. Verify current behaviour for failed destroys and orphaned resources in their docs.

10. DevPod

Client-side and provider-based: the CLI or desktop app creates the machine through a provider (a cloud VM, a Kubernetes pod, a remote Docker host, your laptop) and deletes it the same way. That design is lean and has the residue profile of any client-driven tool -- if the client that created a machine is gone, wiped or offline, there is no server-side control plane holding a list of what it made, and the machine sits in your cloud account under whatever name the provider gave it. Clean when used as designed; the orphan risk is a laptop being replaced. Verify the current provider cleanup and inactivity behaviour in their docs.

The ten, by residue class

Default supported delete, per platform. Non-PandaStack rows are qualitative and from public documentation; retention windows and defaults change, so verify against each vendor's current docs.
PlatformIsolation boundaryDelete removesSurvives by defaultWhere orphans collect
StackBlitz / WebContainersBrowser tab (WASM)Everything server-side (there is little)Saved project, browser storageRemote services the tab talked to
PandaStackFirecracker microVM, own kernel + netnsVM, CoW rootfs, network slot, preview URLDatabases, volumes, persistent sandboxes; snapshots if the idle reaper did the deleteDatabases and snapshots with no owner tag
E2BFirecracker microVMThe sandbox VMAnything persisted or pausedPaused state, external resources
Modal sandboxesgVisor user-space kernelThe sandboxNamed volumes, secrets, imagesNamed objects nobody deletes
DaytonaDepends on deployment runtimeThe sandboxDisk in stopped/archived statesArchived sandboxes
GitHub CodespacesVM per codespaceCodespace and its diskSecrets (by design), stopped disks until retentionForgotten stopped codespaces
Gitpod / OnaVM in your cloud (runner)Workspace instance and diskRunner infrastructureYour cloud account
OktetoKubernetes namespace (shared node kernel)Every namespaced objectRetained PVs, cluster-scoped objectsExternal DNS and cloud resources
CoderWhatever your template provisionsEverything in Terraform statePersistent volumes (by design)Out-of-band resources, failed destroys
DevPodWhatever your provider runsThe machine (via the client)Local client stateCloud accounts of lost laptops

Read the last column, not the third. Every platform's delete does what it says. The residue is in the places the platform cannot see, and the column tells you where to point your audit.

A teardown that leaves nothing, written down

On a microVM platform the boundary takes care of host traces and the delete takes care of compute, disk and network identity. That leaves snapshots, sidecar data and credentials, and the honest way to handle them is a function that owns the whole set, plus a sweeper for when the function never reached its finally.

python
import os
import pandastack
from pandastack import Sandbox

# One environment = one sandbox + one database + whatever snapshots you take.
# Three separate lifecycles. The platform deletes each one when asked; nothing
# deletes the set for you, so this function is the set.
client = pandastack.Client()  # reads PANDASTACK_API_KEY

def run_review_env(pr: int, repo_url: str) -> None:
    db = client.databases.create(label=f"pr-{pr}", size="1g")  # 30-90 s, blocks until ready
    sbx = Sandbox.create(
        template="base",
        ttl_seconds=900,  # IDLE timeout: activity resets it, it is not a wall clock
        metadata={"env": f"pr-{pr}", "db_id": db["id"]},  # the ledger lives on the sandbox
    )
    try:
        sbx.exec(f"git clone --depth 1 {repo_url} /work/app", timeout_seconds=120, check=True)
        sbx.exec(
            f"cd /work/app && DATABASE_URL='{db['connection_url']}' npm ci && npm run migrate",
            timeout_seconds=600,
            check=True,
        )
        print("review at", sbx.preview_url(3000))
        # ... reviewers do their thing ...
    finally:
        for snap in client.snapshots.list(sandbox_id=sbx.id):
            client.snapshots.delete(snap["id"])  # a snapshot is a copy of RAM: secrets included
        sbx.kill()                               # VM, CoW rootfs, netns slot, preview URL
        client.databases.delete(db["id"])        # irreversible, and NOT implied by kill()

Three things in there are deliberate. The database id goes into the sandbox's metadata, so the sandbox is the ledger of what this environment created. The snapshots are deleted before the sandbox, because listing them by sandbox_id is the cheapest way to find them. And the database delete is the last line, since it is the one you cannot undo and the one most worth being sure about. For the seeding half of that flow, see Spin Up an Ephemeral, Seeded Postgres per Pull Request.

python
import pandastack
from pandastack import Sandbox

# pr_is_closed() and looks_like_review_db() are yours to write.
# The sweeper for the case the finally block never ran: the CI runner was
# OOM-killed, someone hit cancel, the laptop closed. Run it on a schedule.
client = pandastack.Client()

live_db_ids = set()
for sbx in Sandbox.list():
    env = sbx.metadata.get("env", "")
    if not env.startswith("pr-"):
        continue
    if pr_is_closed(env):                 # your source of truth, not ours
        for snap in client.snapshots.list(sandbox_id=sbx.id):
            client.snapshots.delete(snap["id"])
        if sbx.metadata.get("db_id"):
            client.databases.delete(sbx.metadata["db_id"])
        sbx.kill()
    elif sbx.metadata.get("db_id"):
        live_db_ids.add(sbx.metadata["db_id"])

# The orphan nobody tagged: a database whose sandbox died first. Only your own
# ledger (or a naming convention you enforce) can tell it apart from a real one.
for db in client.databases.list():
    if db["id"] not in live_db_ids and looks_like_review_db(db):
        print("orphan database:", db["id"])   # report first; delete once you trust the rule
The sweeper finds the sandbox-shaped residue. It cannot find a database whose sandbox died before it was tagged, because no system has the fact that the two belonged together except the one that wrote the tag. That is the general lesson of this whole post, on any platform: the environment platform is never the source of truth for what an environment created. Your PR state is. Your CI run is. Write the link down somewhere that outlives both.

Credentials: the residue class no delete can fix

Deleting an environment destroys a copy of each credential it held. Revocation is a separate act in a separate system, and the only reliable fix is to make revocation unnecessary:

  • Mint per-environment, short-lived credentials -- an OIDC-federated cloud role, a repository-scoped git token with read-only contents -- rather than injecting a long-lived key, and let expiry be the teardown.
  • Never type a personal token into an ephemeral terminal. It will be in shell history, possibly in a snapshot, and certainly not in your revocation plan.
  • Treat memory snapshots as containing every secret the guest had loaded. If you snapshot an environment that held a credential, the snapshot is now a credential store with a slower read path. The Security Gotchas of Firecracker Snapshots (Secrets Frozen in RAM) covers why, and what to do about it.
  • Audit the issuing side, not the environment side: a list of tokens minted in the last week with no matching live environment is the actual residue report.

Why the boundary decides the sixth class

Host-level traces are the class people argue about, because they are rarely exploitable and occasionally catastrophic. The question is simple: after your environment is gone, did it leave anything on a shared machine that the next tenant's environment shares too?

  • Shared-kernel containers -- Shared: the kernel, often a container daemon and its image-layer cache, frequently a package cache someone mounted for speed. A container is a polite suggestion to the kernel; teardown removes your namespace, not your fingerprints in the shared parts.
  • User-space kernels like gVisor -- Shared: far less, because most syscalls never reach the host kernel. Still a shared process host underneath.
  • MicroVMs and VM-per-workspace -- Shared: the hypervisor and, on snapshot-restore designs, read-only copy-on-write template disks and memory. Each guest's writes land in its own layer and go away with it.
  • Browser runtimes -- Shared: the user's browser profile. Which is the user's problem, and arguably the user's business.

On PandaStack, the network slot is the shared object worth mentioning: each agent carves 16,384 /30 subnets out of its address space and keeps network namespaces prebuilt for them, so a slot freed by one sandbox is later handed to another. What gets reused is a subnet and a namespace, not a way in: the preview URL is keyed by the sandbox UUID rather than the slot, so nobody holding the old sandbox's link lands in the new one. The per-sandbox namespace layout is in How Network Namespaces Isolate Each Firecracker MicroVM.

How to choose, by what you need gone

  1. List what your environment creates outside itself. If the answer is a database, a DNS name and a cloud role, pick the platform whose teardown model can own those or plan to own them yourself. The compute is the easy part.
  2. Decide whether you want a recycle bin. Humans want one: an accidental delete of a week's work should be recoverable, which is why the workspace cohort (Codespaces, Gitpod/Ona, Coder) keeps disks. Programs do not: an agent's or a CI job's environment should leave nothing, which favours the sandbox APIs (PandaStack, E2B, Modal, Daytona).
  3. Pick the boundary for the code you run, then accept the host-trace class that comes with it. Untrusted or model-written code wants its own kernel or a user-space one; your own team's code on your own cluster can live with namespaces.
  4. Find out whether the timeout is idle or wall-clock. An idle timer will never kill a forgotten environment that something keeps poking, which describes most preview environments.
  5. Run the residue audit after a week, not a day. Create a hundred, delete a hundred through the supported path, and then list every volume, snapshot, DNS record, database, token and cloud resource in every system involved. Whatever is left is your real teardown, and it is the only number in this post you should trust over your own measurement.

The bottom line

Delete is the most trusted verb in infrastructure and the least verified. Every platform here implements it correctly for the thing it owns, and the difference between them is how much of your environment the platform owns in the first place. Pick for that, write down what it does not own, and sweep for the rest -- because the environment you forgot is not the expensive one. The database it created is.

faq

Frequently asked questions

What usually survives deleting an ephemeral development environment?

Rarely the compute, which every platform removes. What survives is whatever lived in a system the environment platform does not own: snapshots and retained volumes kept by design, databases or buckets the environment created in another service, DNS records and ingress rules, and every credential that was injected into it. Deleting the environment removes the copy of a credential, not the credential. Run a residue audit by deleting environments through the supported path and then listing what remains in each of those systems.

Does sbx.kill() on PandaStack delete my database and snapshots too?

Not the database. kill() removes the sandbox's microVM, its copy-on-write disk layer, its network slot, its preview URL and the snapshots taken from it (an idle-reaped sandbox keeps its snapshots until a later sweep, and client.snapshots.delete(id) removes one explicitly). Managed Postgres databases are separate microVMs deleted with client.databases.delete(id), and volumes have their own delete. There is no environment object that groups them, so put the related ids in the sandbox's metadata and delete the set in one function, with a scheduled sweeper for runs that never reached cleanup.

Is an idle timeout enough to clean up forgotten preview environments?

Usually not on its own. An idle timeout is reset by activity, and preview environments attract background activity -- health checks, monitoring tabs, link-preview bots -- that keeps them alive indefinitely. On PandaStack, ttl_seconds is exactly that kind of idle timeout. Pair it with a sweeper that deletes environments whose pull request is closed, using your PR state as the source of truth rather than the platform's.

Why does the isolation boundary matter for teardown?

Because it decides what an environment can leave on a shared host after it is gone. Containers on a shared kernel can leave traces in shared caches, a shared daemon and kernel state. A user-space kernel such as gVisor shrinks that surface. A microVM per environment shares only the hypervisor and, on snapshot-restore designs, read-only copy-on-write template images, so each guest's writes disappear with its own layer. For untrusted or model-written code, that difference is the reason to choose a VM boundary.

Are memory snapshots a security risk after teardown?

They can be. A memory snapshot is a frozen copy of the guest's RAM, so it contains any secret the processes had loaded at the time. If your environments snapshot for forks, resume or debugging, delete the snapshots as part of teardown, avoid snapshotting while long-lived credentials are in memory, and prefer short-lived credentials whose expiry makes a leaked snapshot useless.

links

Keep reading

more posts

Related posts

More in Security & isolation · See PandaStack security

pandastack

Run code in a microVM in one API call.

50–100 ms cold start. Fork, snapshot, and scale to zero.

measured on the host; your network round trip is extra