Saltar al contenido principal
Back to blog
GDPRGovernanceSecurity

Retention and Deletion Policies for AI Models and Data in the Public Administration

September 11, 20265 min readOptimTech
Share:

Why retention and deletion policies for AI matter in the public sector

Public organizations manage models and datasets that may include personal data, sensitive information or artifacts needed to demonstrate compliance (audits, traceability). Without a clear retention and deletion policy, risks multiply: GDPR breaches, exposures from unnecessary data retention, sovereignty issues and difficulties proving compliance with the EU AI Act and the ENS (Royal Decree 311/2022).

A practical policy reduces the attack surface, supports lifecycle governance of models and shortens response times for audits and citizen requests (for example, responding to data subject rights under the GDPR such as access, rectification, erasure and objection).

Which assets need to be managed and why?

  • Training data and auxiliary datasets: evidence of due diligence and reproducibility; may contain personal data.
  • Models and versions (weights, checkpoints): required for traceability and reproducibility, but can also reproduce personal information.
  • Inference records and decision logs: required by the EU AI Act for certain high-risk systems; useful for audits and incident handling.
  • Evaluation artifacts (metrics, test sets, bias reports): necessary as governance evidence.
  • SBOM / model cards / data sheets: documentation of a model’s composition and data provenance.
  • Backups and archive deposits.

Basic principles for defining retention periods

  • Purpose limitation: keep only what is necessary for the documented and authorized purpose.
  • Data minimization: apply graduated retention periods by asset type (shorter for logs, longer for models and documentation).
  • Accountability and traceability: each asset should have an owner (data steward/model owner) and documented justification for its retention.
  • Legal compatibility: check sectoral obligations (for example, statutory administrative retention periods) and GDPR exceptions (historical archiving or research).
  • Proportionality and risk: higher-risk systems (high-risk under the EU AI Act) require longer retention of logs and evaluation records.

Example timeline (to adapt locally)

Note: these are illustrative examples. Each organization must justify its timelines according to purpose, risk and legal requirements.

  • Interaction logs from public chatbots (e.g., citizen conversations): 30–90 days for operational uses and improvement; keep anonymized or aggregated records for long-term analysis.
  • Decision logs from assisted systems (non-binding): 6–12 months; if the system is high-risk, retain technical logs for at least 2 years for audit purposes.
  • Training sets containing personal data: retain only as long as necessary for reproducibility or improvement and where no retention obligation applies; when no longer needed, proceed to secure deletion or irreversible anonymization.
  • Checkpoints/model snapshots: keep production versions for the support period plus one year; archive older versions with restricted access if needed for compliance.
  • Evaluation reports, model cards and governance documentation: retain while the system is in operation plus an additional 2–5 years for audit evidence.

Operational steps to implement effective policies

1. Inventory and classification

  • Inventory models, datasets, logs and documentation.
  • Classify by sensitivity, risk (under the EU AI Act) and links to personal data.

2. Define retention by category

  • Document the purpose, retention period and legal basis for each category (e.g., service improvement, administrative obligation).
  • Include exceptions and who is authorized to approve extensions.

3. Technical controls

  • Versioning and labeling: identify production, test and archive artifacts.
  • Storage with access controls and encryption.
  • Aligned backup policy: define retention times for copies and deletion procedures for backups.

4. Secure deletion and verification

  • Procedures for logical destruction (overwriting) and physical destruction when applicable.
  • Deletion logs that can demonstrate erasure for audit purposes.
  • If deletion is not legally possible (e.g., administrative retention obligations), apply minimization techniques and restricted access.

5. Integration with the GDPR and the ENS

  • Ensure retention periods and processes allow timely responses to data subject requests (rectification, erasure) within legal deadlines.
  • Incorporate ENS technical and organizational measures (Royal Decree 311/2022): access control, activity logging and information protection.

6. Decommissioning (model retirement)

  • Checklist for withdrawal: notify users, freeze usage, retain final justificatory artifacts, remove residual data and update public records if applicable.
  • Store evidence of decommissioning in the entity’s AI registry.

Governance and responsibilities

  • Appoint an owner for each asset (data steward, model owner).
  • Include retention clauses in contracts with providers (portability and deletion clauses).
  • Conduct periodic reviews (at least annually) of the catalog and retention periods for legal or risk changes.

Immediate practical actions (quick checklist)

  • Produce a minimum inventory of models, datasets and logs within 30 days.
  • Classify by risk and document justified retention periods.
  • Update contracts with deletion and portability clauses.
  • Publish the internal retention policy and a decommissioning procedure.

Takeaway / Recommended action

Define and document a retention and deletion policy for your models and data today: inventory, risk-based classification, justifiable retention periods, technical deletion controls and evidence logging. Start with a pilot on a specific service (e.g., a municipal chatbot) and extend the practice to other systems. In modular platforms like OptimGov, embedding these policies into the model lifecycle design makes it easier to comply with the GDPR, the ENS and the traceability requirements of the EU AI Act.