batch-delete command removes all records in a table that match an encoded query. Use --dry-run to preview the affected records before deletion.Batch-delete records matching a query.
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.
| Name | Required | Description |
|---|---|---|
| table | Yes | The table to delete from. |
| query | Yes | Encoded query identifying records to delete. |
| Flag | Default | Description |
|---|---|---|
| --dry-run | — | Show matching records without deleting them. |
sn batch-delete cmdb_ci_server "install_status=7" --dry-run--dry-run first to verify the query matches only the intended records.