Destructive Changes Using Workbench

  1. Create two files destructiveChanges.xml and package.xml and add content structured similarly to that shown below.
  2. Select the two files just created, right-click, and Send to > Compressed (zipped) folder.
  3. Authenticate into Workbench (workbench.developerforce.com) and the specific Salesforce org you are deleting components from.
  4. In Workbench, navigate to migration > Deploy, and select the zipped folder.
  5. Select Rollback on Error and Single Package, RunSpecifiedTests in the dropdown, and type the name of any test classes you are deleting into the Run Tests text box.
  6. On the next page select Deploy.
  7. The process will take a few seconds. When complete, if successful, it will look like the screenshot below.

Step 1:

destructiveChanges.xml

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns=http://soap.sforce.com/2006/04/metadata>
    <types>
        <members>yc_Test_Score_Trigger</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>yc_Test_Score_Trigger_Handler</members>
        <members>yc_Test_Score_Trigger_Test</members>
        <name>ApexClass</name>
    </types>
</package>

package.xml

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns=http://soap.sforce.com/2006/04/metadata>
     <version>56.0</version>
</package>

Step 4:

Step 5:

Step 6:

Step 7: