Update purge logic