function that clean the archive