How to Delete the Apex Triggers and Apex Classes from Production Salesforce Org?

Follow the below steps to delete the Apex Triggers and Apex Classes to Production Salesforce Org

Use IDE to create a new project and download all apex triggers/ apex classes from production salesforce org.

In the Apex Triggers ore Apex Classes you want to delete, open the metadata file for the respective Apex Class/Apex Trigger and change the status as “deleted”.

Save to server
Observe the status of the class in the example below:

<?xml version=”1.0″ encoding=”UTF-8″?>
<ApexClass xmlns=””>

1) You should try this technique in sandbox and become comfortable with it before attempting in production.
2) Double-check the class name before deleting.


Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *