Skip to content
DT Nova

Data retention policy: GDPR rules, retention periods, a template and deletion in software

A data retention policy says, for each kind of data your company holds, how long it is kept, on what basis, and how it is deleted or anonymised when the time is up. Under the GDPR it is how you show that personal data is not kept longer than necessary, and it gives you the answers your privacy notice and records of processing must contain. This guide explains the legal rules, how to set retention periods, a method using retention classes, a template outline, and how to make deletion happen automatically in your systems.

Legal texts were read on 12 November 2026: Regulation (EU) 2016/679 (GDPR) and, as an example of national retention law, section 257 of the German Commercial Code (HGB). This guide is general information, not legal advice; national retention periods differ.

Why a data retention policy is needed

The GDPR's storage limitation principle, Article 5(1)(e), requires personal data to be "kept in a form which permits identification of data subjects for no longer than is necessary for the purposes for which the personal data are processed". Several other articles depend on knowing the period:

  • Article 13(2)(a) and 14(2)(a): privacy notices must state the period for which data will be stored or, if that is not possible, the criteria used to determine it.
  • Article 30(1)(f): records of processing must contain, where possible, the envisaged time limits for erasure of the different categories of data.
  • Article 17(1)(a): people have the right to erasure when data is no longer necessary for its purposes.
  • Article 25(2): data protection by default covers the period of storage, so systems should keep only what is necessary by default.

Beyond compliance, retention is risk control. Data that no longer exists cannot be stolen in a breach, does not need to be searched when someone asks for their data, and does not slow down systems.

Retention periods: the GDPR and other laws

The GDPR does not set periods; it sets the principle. Periods come from three sources:

  1. Legal retention duties. Accounting, tax, employment, health and sector laws require some records to be kept for a minimum time. Article 17(3)(b) GDPR confirms that the right to erasure does not apply where processing is necessary for compliance with a legal obligation under Union or Member State law.
  2. Limitation periods for legal claims. Records needed to defend or bring a claim may be kept until the claim can no longer be made, if that is documented.
  3. The business purpose. Everything else: a lead that never became a customer, an applicant who was not hired, website analytics, support tickets. The company decides and justifies a period.

As an example of a national rule, section 257 of the German Commercial Code requires merchants to keep books, inventories, annual financial statements and management reports for ten years, booking vouchers for eight years, and received and copies of sent business letters for six years, with the period starting at the end of the calendar year in which the record was made. Every Member State has its own rules for accounting and tax records, and a company operating in several countries needs the longest applicable period for each record type.

The method: data types, retention classes and triggers

A practical retention policy does not list every field in every system. It groups data and applies rules to the groups:

  1. Data types. List the kinds of data the company holds, by process: customer master data, orders, invoices, contracts, support tickets, marketing contacts, applicants, employee files, payroll, access logs, video surveillance, backups.
  2. Trigger events. For each type, when the clock starts: end of the contract, end of the calendar year of the invoice, rejection of the application, last activity, end of employment.
  3. Retention classes. A small set of standard periods, for example: deleted when no longer needed, 30 days, 6 months, 2 years, 3 years, 6 years, 10 years after the trigger. Each data type is assigned to one class with the legal basis or reason.
  4. Action at the end. Delete, anonymise or move to restricted archive, and who confirms it.

Grouping into classes keeps the policy readable and makes automation simple: the system needs to know only the class and the trigger date of each record.

Example: retention classes for a sales company

Data typeTriggerPeriodBasisAction
Website analytics with identifiersCollectionSet by the company, e.g. 14 monthsBusiness purposeAutomatic deletion
Leads with no contactLast activitySet by the company, e.g. 12 monthsBusiness purposeDelete
Rejected applicantsRejectionSet by national law and claim periodsDefence of claimsDelete
Customer master dataEnd of relationshipUntil claims expireContract, claimsDelete or anonymise
Invoices and booking recordsEnd of financial yearNational accounting lawLegal obligationArchive, then delete
Access and security logsCreationSet by the company, e.g. 12 monthsSecurityAutomatic deletion
BackupsCreationFixed backup cycleSecurity, continuityExpire automatically

The periods marked "e.g." are illustrations of the decision a company makes and documents, not recommendations; legal periods must be checked for each country.

A data retention policy template outline

  1. Purpose, scope (companies, systems, paper and electronic records), owner, approval, version, review date.
  2. Principles: storage limitation, legal retention, data minimisation, deletion by default.
  3. Roles: management, data owners per process, IT, the data protection officer.
  4. Retention classes and their periods.
  5. Retention schedule: each data type with trigger, class, basis, location and action.
  6. Deletion and anonymisation methods per medium, including paper.
  7. Backups, logs and copies: how they expire and how restored data is cleaned.
  8. Legal holds: how deletion is suspended when litigation or an investigation requires it.
  9. Processors: how deletion at the end of a contract is ensured.
  10. Evidence: deletion logs and the yearly review.

Deletion in software: making the policy happen

A retention policy is only as good as the deletion that follows. In systems we build, retention is part of the data model from the first version:

  • Retention class and trigger date stored per record or per record type, so the system knows what is due.
  • Scheduled deletion jobs that delete or anonymise due records every night, and log what they did without logging the personal data itself.
  • Legal hold flags that stop deletion for specific records when needed.
  • Cascade rules so that deleting a customer also removes attachments, search indexes and cached copies.
  • Integrations that pass deletions on to connected systems, or a report of what must be deleted manually.
  • Backups with fixed expiry so deleted data disappears from backups within a known time.

Processors need the same care. Article 28(3)(g) GDPR requires the processor contract to provide that, at the choice of the controller, the processor deletes or returns all personal data at the end of the service. Our data processing agreement guide covers that clause, and a document management system can apply retention rules to files and records automatically.

Common mistakes

  • A policy that says "as long as necessary" without a period or criteria.
  • Periods decided by IT without the business, or by the business without checking legal duties.
  • Deleting from the main system and forgetting exports, spreadsheets, email and backups.
  • No log, so the company cannot show that deletion happened.
  • Keeping everything "just in case", which increases breach impact and the work of every access request.

How we help

We build retention and deletion into the systems we deliver, and add them to existing ones: retention classes in the data model, automatic deletion jobs, legal holds, deletion logs, and backups that expire on schedule, hosted in the EU. When a new system involves higher-risk processing, retention is part of the DPIA, and our backup strategy guide explains how backup cycles fit the policy.

Questions people ask

What is a data retention policy?

A data retention policy sets out, for each type of data a company holds, how long it is kept, why, where, and how and by whom it is deleted or anonymised at the end. Under the GDPR it is the practical way to meet the storage limitation principle and to answer the retention questions in privacy notices and records of processing.

How long can personal data be kept under the GDPR?

The GDPR sets no fixed periods. Personal data may be kept in identifiable form for no longer than is necessary for the purposes of processing. Where another law requires data to be kept, such as accounting or tax law, that law sets the minimum period. Each company has to decide and document a period, or the criteria for one, per type of data.

Does deleting data from the live system mean it is deleted?

Not entirely. Copies may remain in backups, logs, exports, email attachments and connected systems. A retention policy should say how each of those is handled, for example that backups expire on a fixed cycle and restored data is cleaned again before use.

Is anonymisation the same as deletion?

Truly anonymised data, which can no longer be linked to a person by any reasonably likely means, is outside the GDPR and can be kept for statistics. Pseudonymised data, where a key still exists somewhere, is still personal data. Removing names alone is rarely enough to anonymise.

Who should own the data retention policy?

Management approves it; each system or process owner is responsible for applying it to their data; the data protection officer, if there is one, advises and checks. IT implements automatic deletion, but the business decides the periods.

Sources