Delete Apex Class or Trigger in Salesforce Production Org Using Eclipse

It is not possible to directly delete an Apex class or trigger after it has been deployed to production. Here are the steps to delete apex class or trigger in Salesforce Production Org by using eclipse and Force.com IDE.

  • Download and Install the Force.com IDE for Eclipse.
  • Connect to the Salesforce Production org.
  • Download the apex class/trigger.
  • Open the meta.xml file of the Apex class/trigger.
  • Change the status of the Apex class/trigger to Deleted.
  • Save and deploy to server.

Note: Apex class status can only be changed to “Active” or “Deleted” and not “Inactive”.