improve error prone purge task
add purge to ui