+ Start a Discussion
Keith654Keith654 

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) {
    System.debug(c);
}

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?

 

Thanks,

Keith

Keith654Keith654

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.