remove staled codes