Note: There are several ways to delete deployed Apex triggers in Salesforce. The method described below uses the Workbench application.
Step 1: Create destructiveChanges.xml
This file lists the Apex triggers to delete. Example:
********************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>TriggerName1</members>
<members>TriggerName2</members>
<name>ApexTrigger</name>
</types>
<version>60.0</version>
</Package>
********************************************************************************
Replace TriggerName1, TriggerName2 with your actual trigger API names.
Step 2: Create package.xml
Even for deletions, this must be present (can be empty):
********************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>60.0</version>
</Package>
********************************************************************************
Step 3: Zip the Files
Create a .zip file (e.g., deleteTriggers.zip) with the two files at the root level:
deleteTriggers.zip
package.xml
destructiveChanges.xml
β Do not place them inside a subfolder.
********************************************************************************
Step 4: Deploy Using Workbench
Login with your org using credentials.
Navigate to: Migration > Deploy.
Choose your zip file (deleteTriggers.zip).
Set the following options:
Rollback On Error: Checked
Single Package: Checked
Test Level: RunSpecifiedTests
Click Deploy.
********************************************************************************
Step 5: Validate the Result
Check the result. If successful, the triggers will be deleted.
Important Notes:
Make sure the API version in the above files matches the version you select in Workbench.
Ensure the triggers aren't referenced in active flows or Apex classes.