Delete captured data

You can delete captured data through the Viam app, the CLI, or the SDK. The SQL and MQL query editor is read-only: you cannot run DELETE, DROP TABLE, or any write operation through it.

Retention policies can also auto-delete data in the cloud after a configured number of days, without anyone running a delete operation. Set them per resource or for a whole machine part.

Delete captured data

  • Images and binary data: on the DATA page, select one or more items and click the Delete button (for example, Delete 3 images), or use Delete all with the current filters applied. Point clouds, video, and file uploads can be deleted the same way.
  • Tabular data (sensor readings): the Sensors tab does not have a delete button. Use the CLI or the SDK instead.

Delete tabular data older than a number of days:

viam data delete tabular --org-id=<org-id> --delete-older-than-days=30

If the organization has a hot data store, matching data is deleted from that store as well.

Delete binary data within a time range:

viam data delete binary \
  --org-ids=<org-id> \
  --start=2026-01-01T00:00:00Z \
  --end=2026-02-01T00:00:00Z

The binary delete command requires --org-ids, --start, and --end. Narrow further with optional filters for location, machine, part, component, MIME type, and bounding-box label. For the full list, see the viam data delete binary CLI reference.

Delete tabular data older than a number of days:

deleted = await data_client.delete_tabular_data(
    organization_id="<org-id>",
    delete_older_than_days=30,
)

Delete binary data matching a filter:

from viam.utils import create_filter

my_filter = create_filter(
    component_name="camera-1",
    organization_ids=["<org-id>"],
)

deleted = await data_client.delete_binary_data_by_filter(my_filter)

Delete specific binary items by ID:

deleted = await data_client.delete_binary_data_by_ids(
    ["binary-data-id-1", "binary-data-id-2"],
)

See the data client API for the full set of methods and signatures.

Delete tabular data older than a number of days:

deleted, err := dataClient.DeleteTabularData(ctx, "<org-id>", 30, nil)

Delete binary data matching a filter:

filter := &app.Filter{
    ComponentName:   "camera-1",
    OrganizationIDs: []string{"<org-id>"},
}

deleted, err := dataClient.DeleteBinaryDataByFilter(ctx, filter)

Delete specific binary items by ID:

deleted, err := dataClient.DeleteBinaryDataByIDs(
    ctx,
    []string{"binary-data-id-1", "binary-data-id-2"},
)

See the data client API for the full set of methods and signatures.

Related pages