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
Apex Code DevelopmentApex Code Development 

How to delete unnecessary Apex classes from Production environment?

Hi Folks!!

 

I am facing this error while deploying my Apex code from sandbox to Production:

 

The total size of apex code in this application after removing comments exceeds the maxiumum character size of 2000000

 

That is why I want to delete some unnecessary classes from Production.

 

Kindly suggest me how to delete Apex classes from Production.

 

Thanks in advance,

Jagadeesh K.

Ritesh AswaneyRitesh Aswaney

Delete them on your dev sandbox and then attempt to deploy via the IDE - the deleted entries will show up in Red - select them for deploy them - hit  deploy and it should delete on prod, provided the code you're getting rid of is not reference else where. Else you might have to comment those class references, deploy them first, and then deploy the deletes.