How to delete a class from production using destructiveChanges.xml

Can any one tell me the steps to delete a class using destructiveChanges.xml


  1. Fulfill the PreRequisites for using the Migration tool
  2. Install the Java JRE/ JDK
  3. Install Apache Ant
  4. Copy the ant-salesforce.jar file from the unzipped file into the ant lib directory.
  5. Follow the steps at Apex deploying using Ant to understand the basic setup
  6. Construct your destructiveChanges.xml file using Propagating Destructive Changes


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="">

Run the Force Migration tool

C:\>ant undeployCode

Here’s a Video Tutorial

Source : Link , Question Author : Priyanka , Answer Author : Paul T. Rawkeen

Leave a Comment