To delete a community from the repository, use RAMCommunity.setAction(RAMAction) and pass in RAMAction.DELETE.
//Delete the community
community.setAction(RAMAction.DELETE);
session.put(community, new NullProgressMonitor());