function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

delete a class/trigger from the production

How can i delete a class/trigger from the production environemnt?



We strongly recommend against creating projects in the IDE against production organizations. Instead, you should create a Development Sandbox and write your Apex classes, triggers, and tests there. When all is working as you want it, use the Deploy to Server wizard in the IDE to push the changes to your production organization. All Apex-enabled production organizations include at least one Development Sandbox--see online help for more information.

To delete a class using this method, delete the class from your sandbox and then use the Deploy to Server wizard. In Step 3 you will be given the option to select the class from your production organization, that is no longer in your project, for deletion.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 


Thanks for the suggestion.

I have a couple of sandbox linked to my Prod. To reduce the complexity i have written a new class and deployed to Prod. This is working fine, but the old class is of no use in Prod. i have made it Inactive in Sandbox and deployed, so it is Inactive in Prod. But i wanted to delete it from Prod.

As you mentioned, it can be done using the IDE. But i have not used IDE for this project.

Can this be done without IDE?