Find your content:

Search form

You are here

How do you delete a class from production without using an IDE?


I want to delete a previously deployed class. Is there a way to do it strictly through the web interface (sandbox and/or production)?

I'm kind of surprised that something like this isn't at least slightly easier to do.

When looking for an answer every place explains how to do it through the IDE but I don't have access to a security token that can do that, I only have access to their sandbox and production accounts through the "grant login" feature (custom work on a client's system).

Attribution to: Ryan Elkins

Possible Suggestion/Solution #1

I am 99.999% sure that you cannot delete the class through the Salesforce Web interface. You cannot do it through Changesets.

I believe that you have to use something backed by the metadata API such as the IDE or the Ant Migration tool with a destructiveChanges file. That is no help for you, however, since you'd need the token in your situation.

Attribution to: Peter Knolle

Possible Suggestion/Solution #2

I guess you can do that with the Developer Workbench.


  1. Navigate to Rest Explorer
  2. Select Delete
  3. call /services/data/v34.0/tooling/sobjects/ApexClass/{Class Id}

Also you can query for desire class by Id: /services/data/v34.0/tooling/query/?q=Select+Id+from+ApexClass+Where+Id='{Class Id}'

or query by name: /services/data/v34.0/tooling/query/?q=Select+Id,Name+from+ApexClass+Where+Name='{name of the class}'

Attribution to: Alexander
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content