+ Start a Discussion
Akis AthanasiadisAkis Athanasiadis 

Delete apex

How can i Delete apex class/trigger from production?
I have found several articles but they are 8-9 years old and what is described is not helpful.
Best Answer chosen by Akis Athanasiadis
Akis AthanasiadisAkis Athanasiadis
Well i found a very nice solution as in the video:
Delete Apex Class (https://www.youtube.com/watch?v=n4LH_fUtaGE)

All Answers

Danish HodaDanish Hoda
Hi Akis,
You cannot delete those from Prod, if those are of no use, comment the codes in Sandbox and deploy it to Prod.
Akis AthanasiadisAkis Athanasiadis

Hi Danish,
unfortunately this is an issue. a previous developer named a class as test. even if I comment out everything, when I try to install a pacakge on the production, the name Test is detected and the package cannot be installed. An indicative example of the error i get:

TestAccountQuickContactController: Method does not exist or incorrect signature: void startTest() from the type Test

Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi akis,

Please refer below links which might help you in this.

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards
Akis AthanasiadisAkis Athanasiadis
Well i found a very nice solution as in the video:
Delete Apex Class (https://www.youtube.com/watch?v=n4LH_fUtaGE)
This was selected as the best answer
Deepali KulshresthaDeepali Kulshrestha
Hi Akis,

Greetings to you!

I have gone through your query, please try below link to Delete apex class/trigger from the production:

1. https://www.greytrix.com/blogs/salesforce/2014/11/29/delete-apex-class-or-trigger-in-salesforce-production-org/

2. https://developer.salesforce.com/forums/?id=906F00000008yIyIAI

3. https://sfdcfanboy.com/2017/11/24/a-tip-a-day-24-3-ways-to-delete-an-apex-class-from-production/

4. https://success.salesforce.com/answers?id=9063A000000DhsbQAC

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha