You should only keep payroll data for as long as is necessary. This will depend on the purpose for which the data was collected and the applicable legal requirements.