DELETE FROM CONTENT WHERE OJB_CONCRETE_CLASS LIKE 'net.sourceforge.fenixedu.domain.contents.MetaDomainObjectPortal' AND NAME = 'pt13:departamentos';

DELETE FROM NODE WHERE KEY_CHILD NOT IN (SELECT ID_INTERNAL FROM CONTENT);
DELETE FROM NODE WHERE KEY_PARENT NOT IN (SELECT ID_INTERNAL FROM CONTENT);