# force data bulk delete

Bulk delete records from an org using a CSV file. Uses Bulk API 1.0.

## Description for force data bulk delete

The CSV file must have only one column ("Id") and then the list of record IDs you want to delete, one ID per line.

When you execute this command, it starts a job and one or more batches, displays their IDs, and then immediately returns control of the terminal to you by default. If you prefer to wait, set the --wait flag to the number of minutes; if it times out, the command outputs the IDs. Use the job and batch IDs to check the status of the job with the "sf force data bulk status" command. A single job can contain many batches, depending on the length of the CSV file.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description                                                                                                                                         |
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`  | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                          |
| `--file`         | `-f`              | **Type:** Value<br>**Required**<br><br>CSV file that contains the IDs of the records to delete.                                                     |
| `--flags-dir`    | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                         |
| `--json`         | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                     |
| `--sobject`      | `-s`              | **Type:** Value<br>**Required**<br><br>API name of the Salesforce object, either standard or custom, that you want to delete records from.          |
| `--target-org`   | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |
| `--wait`         | `-w`              | **Type:** Value<br><br>Number of minutes to wait for the command to complete before displaying the results.                                         |

## Examples for force data bulk delete

Bulk delete Account records from your default org using the list of IDs in the "files/delete.csv" file:

```shell
sf force data bulk delete --sobject Account --file files/delete.csv
```

Bulk delete records from a custom object in an org with alias my-scratch and wait 5 minutes for the command to complete:

```shell
sf force data bulk delete --sobject MyObject__c --file files/delete.csv --wait 5 --target-org my-scratch
```
