refactor confirm logic in katest clean_db