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

How to get rid of Status='Deleted' classes from ApexClass

I have two classes that are not visible in the developer web UI but appear in the Force IDE when I do a "Refresh From Server" (and therefore will end up in SVN and other orgs I push the code into).


Running this query via execute anonymous:


ApexClass[] cs = [select Name, Status from apexclass where Status='Deleted'];
for (ApexClass c : cs) {

shows that the two classes have a status of 'Deleted' whereas all other classes have a status of 'Active'. Attempting to update or delete via execute anonymous returns a "DML not allowed on ApexClass" error.


Does anyone know how to get rid of these classes?





PS The classes are part of a managed released package that has been deployed. They are non-global which AFAIK means they can still be deleted though.