Awaiting clarification of the question - see the DML removal operation . This will allow you to delete one or more existing sObject entries, including custom objects, from Apex.
You may need to verify that the sObject you are trying to delete has the delete property.
Foo__c ( "__c", , sObject), Apex :
List<Foo__c> existing = [SELECT Id From Foo__c];
delete existing;