sndev.io / docs

batch-delete

Batch-delete records matching a query.

The batch-delete command removes all records in a table that match an encoded query. Use --dry-run to preview the affected records before deletion.
sn batch-delete <table> <query> [--dry-run]

Batch-delete records matching a query.

Arguments

NameRequiredDescription
tableYesThe table to delete from.
queryYesEncoded query identifying records to delete.

Flags

FlagDefaultDescription
--dry-runShow matching records without deleting them.

Examples

sn batch-delete cmdb_ci_server "install_status=7" --dry-run
Dry run — records that would be deleted:
cmdb_ci_server: 8 records
(run without --dry-run to delete)
Deletions are permanent. Always run with --dry-run first to verify the query matches only the intended records.