+ Start a Discussion
mavsmavs 

Delete Apex class from Production

Can we delete apex class from Production environment?

 

i know we can disable but looking to delete them

paul-lmipaul-lmi

delete the class(es) from the source org, then deploy the Classes folder to Prod to deploy those deletes.

forecast_is_cloudyforecast_is_cloudy

That's correct. Just remember though that you'll be required to have >=75% test coverage across the remaining code base in your Production Org after these classes are deleted.

bob_buzzardbob_buzzard

And it will get your heart rate up as you'll convince yourself part way through that its actually going to delete all your live code :)

tonante27tonante27

Ok I see now. Thanks.  Earlier someone was trying to find out if you could just go into the Meta XML file of the class and just sleect Inactive just like you can do with Triggers in order to make the class inactive or deleted but I guess that would be dangerous if we could simply do that because of the possible impacts to other class files that are dependent upon that  newly deactivated  class(?).