One of the possible response actions when a threat is detected is to delete the file from the device.
For details on how to create the Delete file task, refer to Kaspersky Endpoint Security for Windows Online Help.