DPDP data retention and erasure: how to build deletion that actually works

DPDP Rule 8 in engineering terms: retention as code, erasure across databases, backups and vendors, the 3-year rule and the 1-year log minimum.

INDI TECHNOLOGYUpdated 7 min read

Most products are very good at collecting data and very bad at deleting it. Records live on in replicas, backups, search indexes, analytics warehouses, CSV exports and a dozen SaaS tools. Under India's DPDP Act and Rules, that becomes a legal risk from 13 May 2027.

This guide explains what the law requires on retention and erasure, and how to build deletion that reaches every copy and can be proven.

Last reviewed: 21 November 2026. Engineering guidance, not legal advice. Retention periods required by other laws vary; confirm yours with counsel.

What the law requires

The general rule: delete when the purpose is over

A Data Fiduciary must erase personal data, and make its Data Processors erase it, as soon as:

  • the person withdraws consent, or
  • it is reasonable to assume the purpose is no longer being served

unless keeping it is necessary to comply with another law.

The Act treats a purpose as no longer served when the person hasn't approached you for it or exercised their rights for a prescribed period. The Rules set that period for certain large platforms, as described below.

Three years for large consumer platforms

The Third Schedule of the DPDP Rules sets a fixed period for three classes of Data Fiduciary:

Class Threshold (registered users in India)
E-commerce entities 2 crore or more
Online gaming intermediaries 50 lakh or more
Social media intermediaries 2 crore or more

For these platforms, personal data must be erased three years after the later of:

  • the last time the person used the service or exercised a right, or
  • the date the Rules came into force for this purpose

There are exceptions, such as keeping data needed to let the person access their account or a virtual wallet balance.

They must also warn the person at least 48 hours before erasure, telling them the data will be erased unless they log in or contact the fiduciary.

Rule 8 also sets a floor. Every fiduciary must keep the personal data, associated traffic data and other logs related to its processing for at least one year from the date of processing, for purposes listed in the Rules, such as requests from the government. After that, they must be erased unless another law requires longer.

Rule 6 also lists log retention of at least a year among the minimum security safeguards. So:

  • Business data: keep only as long as the purpose needs, or as other laws require
  • Processing logs and traffic data: keep at least one year, then delete

The right to erasure

People can ask you to erase their personal data. You must do so unless you need it for the specified purpose or to comply with law. You must respond within the period you publish, which can be no more than 90 days.

Other laws can require longer

The DPDP Act doesn't override other legal duties to keep records. Common examples for Indian businesses:

  • KYC and transaction records for regulated entities under the Prevention of Money Laundering Act, generally for five years after the business relationship ends or the transaction
  • tax and GST records, for the periods set by tax law
  • sector rules from RBI, SEBI, IRDAI or health regulators

The answer is not "keep everything just in case". Keep only the specific fields the other law requires, for the period it requires, restrict who can see them, and delete the rest.

Design: retention as code

A retention policy in a PDF never gets enforced. Put it in code, next to the purpose register you use for consent.

# retention.yaml: reviewed by legal, product and engineering
categories:
  account_profile:
    fields: [name, email, mobile, address]
    purpose: account
    keep: until_account_closed + 1y
  kyc_records:
    fields: [pan, aadhaar_masked, kyc_photo, kyc_result]
    purpose: kyc
    basis: legal_obligation   # PMLA
    keep: relationship_end + 5y
    access: compliance_team_only
  marketing_profile:
    fields: [email, segments, campaign_history]
    purpose: marketing_email
    keep: until_consent_withdrawn
  order_history:
    fields: [order_id, items, amount, invoice]
    purpose: orders
    basis: legal_obligation   # tax law
    keep: per_tax_law
  processing_logs:
    sources: [api_access_logs, auth_logs, data_access_audit]
    keep: min 1y, max 1y + 30d
  inactive_user_rule:            # only if you are in a Third Schedule class
    inactive_after: 3y
    warn_before: 48h

Then:

  1. Every table, bucket, topic and index is tagged with the categories it holds. Check this in CI: a new table without a category tag fails the build.
  2. A scheduler runs the policy daily, finds records past their period, and starts erasure.
  3. Each run writes a report of what was deleted, from where and when. This is your evidence.

Erasure that reaches every copy

Deleting a row from the main database is the easy 10%. Plan for the rest.

Primary databases

  • Hard delete or anonymise. For records you need for reports or accounting, replace personal fields with nulls or irreversible tokens, and keep the non-personal facts (an order total, a date).
  • Soft-delete flags don't count as erasure. If you need a grace period for undo, give it a short, fixed expiry and then purge.
  • Watch foreign keys. Plan the order of deletion so you don't leave personal data stranded in child tables.

Search indexes, caches and replicas

  • Remove documents from Elasticsearch or OpenSearch indexes, and purge caches by key.
  • Read replicas follow the primary, but data copied into other databases for reporting or testing doesn't. Include them.

Analytics and data warehouses

  • Events often carry user IDs, emails or phone numbers. Replace direct identifiers with a pseudonymous ID at ingestion, and keep the mapping in one place. Deleting the mapping then makes historic events non-personal.
  • Run the same erasure jobs on BigQuery, Snowflake or Redshift tables, including derived tables.

Files and object storage

  • KYC documents, uploads, exports and generated PDFs. Use lifecycle rules for simple expiry, and explicit delete jobs for per-person erasure.
  • Don't forget ad-hoc exports: CSVs in shared drives and attachments in tickets. Make exports expire automatically.

Backups

You usually can't edit a backup, and the law doesn't expect you to restore one just to delete a row from it. A common, defensible approach:

  • keep backups for a short, fixed period (for example 30–35 days), encrypted and access-restricted
  • keep a deletion log of people erased since each backup
  • if a backup is ever restored, replay the deletion log before it goes live

Document this in your retention policy so it's a decision, not an accident.

Third-party processors

Every vendor that received personal data must erase it too: CRM, email and SMS tools, support desks, analytics SDKs and payment providers (within what they're legally allowed to delete).

  • Keep a processor register: vendor, data categories, region, how erasure works (API, admin action or automatic expiry)
  • Call vendor deletion APIs from the same erasure job, and track a confirmation for each
  • Put erasure and retention terms in every processor contract

The three-year inactivity rule in practice

If you're a large e-commerce, gaming or social platform:

  1. Track last activity per person: logins, orders, rights requests. Store it in one place.
  2. A daily job finds people who are three years minus some lead time inactive.
  3. Send the 48-hour (or longer) warning, saying the data will be erased unless they log in or contact you.
  4. If they don't, run the full erasure, keeping only what other laws require.
  5. Record the warning, the deadline and the erasure in your evidence log.

Send the warning earlier than 48 hours, for example 14 days ahead with a reminder at 48 hours. It's kinder to customers and gives you room if email delivery is slow.

Proving it

When asked, you should be able to show:

  • the retention policy and when it was approved
  • that every data store is tagged and covered
  • erasure run reports: counts per category and per system, and errors
  • for a specific person: when the request or trigger came, what was erased where, and vendor confirmations

Checklist

  • Retention periods per data category, approved and stored as code
  • Every table, bucket, index and topic tagged with categories; CI check for untagged stores
  • Daily retention job with run reports
  • Per-person erasure that covers databases, indexes, caches, warehouses, files and exports
  • Anonymisation for records kept for accounting or legal reasons
  • Short, fixed backup retention plus a deletion log replayed on restore
  • Processor register with erasure method and confirmation tracking
  • Logs and traffic data kept at least one year, then deleted
  • Rights requests answered within your published period (90 days at most)
  • For large platforms: inactivity tracking, 48-hour warnings and three-year erasure

We build retention and erasure pipelines across application databases, cloud storage and data warehouses as part of our data and cloud work. If your data is spread across more systems than anyone can list, let's map it together.

Any idea in mind? Let's make it real.

Tell us what you're building. You'll hear back from an engineer, not a sales team, usually within one working day.

Book a 30-min call