Properly clean the es database