A payroll service provider imports its customers’ master data every month. The import job places CSV files with names, bank details and salaries in a working directory. After a server migration, the clean-up script stops running. Two years later, a penetration test finds twenty-four months of salary data for thousands of employees there, readable by every service on the server. A.2.4.2 requires you to remove temporary files from the processing of personal data by a set procedure and within a documented period, and to check regularly that this really happens.
Temporary files are the blind spot of every deletion plan. Nobody created them on purpose, nobody lists them in a register, and yet they often contain exactly the data that is carefully protected elsewhere.
What does the standard require?
In substance, A.2.4.2 matches A.1.4.7 for controllers. For processors it often matters even more, because they run the systems in which the files arise.
- Procedure and period. Temporary files arising from the processing of personal data are removed in a documented way, for example erased or destroyed, within a set period that is documented as well.
- Regular checks. At fixed intervals, you check whether temporary files that are no longer needed have actually gone within the period.
- Background. The standard explains that systems constantly produce such files in normal operation, for example file system roll-back journals or files that come with database updates and the running of other applications. Once the task is done they are surplus, yet they cannot always be removed straight away.
- Clean up by last use. Because the lifetime of such files is often hard to predict, the standard recommends a clean-up procedure along the lines of garbage collection. It finds the files concerned and works out how long ago they were last used.
In practice
Record where the files arise. For each system and application, record where temporary files with personal data are created: working directories of imports and exports, staging areas for uploads, generated reports, crash dumps, swap files, artefacts in build and test environments, queues and caches.
Set a period per class. Group the locations into classes and give each class a maximum lifetime. Working files of an import rarely need to live beyond the end of the run. Database journals follow the cycle the database sets.
Clean up automatically. Put the periods into practice technically: clean-up jobs, cache settings, lifecycle rules in object storage, clean-up at the end of every job. A procedure someone has to run by hand will be forgotten sooner or later.
Check regularly. At a fixed interval, for example quarterly, check whether the listed systems hold files older than their period. Remove leftovers, look for the cause and record date, system and result.
Include new systems. Make temporary files a fixed point when new systems are introduced and when larger changes are made. A server migration or a new operating system can silently disable existing clean-up rules.
Typical audit evidence
For A.2.4.2, auditors typically expect:
- List of locations where temporary files arise, per system, with class and maximum lifetime
- Documented deletion procedure, for instance in the operating documentation or a deletion policy (→ Data Deletion, Masking & Leakage Prevention Policy)
- Configuration of clean-up jobs and lifecycle rules
- Records of the regular checks with date, system and result (→ Deletion Evidence Log)
- Change records showing that temporary files are considered for new systems
KPI
% of temporary files with defined retention and deletion schedules
Individual files can hardly be counted, so in practice you measure by the listed locations: how many of them have a documented period and a technical implementation? The target is 100%. The regular check provides the counter-test of whether the periods are kept.
Supporting KPIs:
- Number of files found beyond their period per check
- Share of systems with automatic clean-up
- Share of checks carried out at the planned interval
Link to the GDPR
The control puts the principles of data minimization and storage limitation in Article 5(1)(c) and (e) GDPR into operation. These principles are addressed to the controller, and the processor helps carry them through the design of its systems. Forgotten temporary files are also among the security risks addressed by Article 32. Under Article 28(3)(c), the processor takes all measures required under Article 32 (→ GDPR General Data Protection Regulation).
Related controls
A.2.4.2 is a small and very concrete building block of deletion:
- A.1.4.7 Temporary files: the same control for controllers.
- A.2.4.3 Return, transfer or disposal of PII: deletion of all data at the end of the assignment.
- A.2.5.8 Engagement of a subcontractor to process PII: passes the duty on to subcontractors.
- A.8.10 Information Deletion: the general deletion control of ISO 27001.
Sources
- ISO/IEC 27701:2025, Annex A, Table A.2, A.2.4.2, and Annex B, B.2.4.2: Temporary files
- Regulation (EU) 2016/679 (GDPR), Articles 5, 28 and 32
- ISO/IEC 27701: Privacy Information Management System: structure of the standard and roles