deletes ids from database