When to purge an image