What Your Vector Database delete() Actually Does

In an HNSW-backed store, delete() changes a record's visibility and not the storage. The engine marks the record and hides it from queries. The vector stays in the segment file until a separate job, the compaction, rewrites that file.

Qdrant's own documentation says so: “Qdrant does not delete entries immediately after a query. Instead, it marks records as deleted and ignores them for future queries.” The engine defers the work on purpose. Removing a node from a Hierarchical Navigable Small World graph means finding every neighbour that points at it and re-wiring their edges so the graph stays connected. Because that is expensive, the engine defers it and batches it up later.

A threshold determines when “later” arrives.

The scheduler decides when data is erased

Qdrant's vacuum optimizer runs only once two conditions are met. Both are configurable, and most teams never change the defaults: deleted_threshold (default 0.2) sets the minimal fraction of deleted vectors in a segment required to trigger optimization, and vacuum_min_vector_number (default 1000) sets the minimal number of vectors a segment must hold to be considered at all.

Run a single Art. 17 request through those numbers. A customer asks you to erase their data. You find their seven chunks and delete them, and the API acknowledges. The seven vectors sit in a segment holding 200,000 vectors. The deleted fraction is therefore 0.0035%, and the threshold is 20%. The optimizer checks the segment, finds nothing to do, and moves on. That stays true until other writes push the segment's deleted fraction past one fifth. On a stable knowledge base, that day may never come.

delete(id) API returns 200 Tombstone set vector still on disk Optimizer check deleted ≥ threshold? segment ≥ min size? Segment rewritten bytes actually gone Nothing happens vector stays, invertible yes no
Your API call reaches the second box. The optimizer in the third box decides whether the data is erased, on its terms and not on yours.
What this means for evidence. A single Art. 17 request against a large segment is, statistically, the case least likely to trigger compaction. The delete call therefore does not prove erasure; only proof that compaction ran does.

A per-store reality check

Each engine handles this differently, but the direction stays the same:

  • Qdrant — tombstones plus the vacuum optimizer described above. You can read the thresholds and set them per collection, which makes Qdrant one of the few stores where you can drive and observe compaction.
  • Chroma — delete() updates the metadata in SQLite so queries skip the entry, and it does not rewrite the HNSW index file. A reported issue on v0.6.3 found that the database even grew after documents were deleted, with the retained content sitting in the embeddings_queue table “in the form of plain text and embeddings”. That issue has been closed since June 2025, and chroma utils vacuum shrinks the database and turns on continuous log pruning. An open bug report from August 2026 describes vacuum as not removing the vectors of deleted records from the HNSW index.
  • FAISS — HNSW indexes have no delete here. remove_ids is supported by index types like IndexFlat, IndexIVFFlat and IDMap (IVF needs its direct map enabled), but for HNSW the documentation states that removing vectors is not supported, which leaves rebuilding the index. FAISS is a library and not a database, so erasure remains your job.
  • Weaviate — deletes write tombstones that a periodic cleanup removes. cleanupIntervalSeconds on the vector index governs it, together with the TOMBSTONE_DELETION_CONCURRENCY and TOMBSTONE_DELETION_MIN_PER_CYCLE / MAX_PER_CYCLE environment variables. The cleanup therefore runs on a clock you set instead of hanging on a threshold, but here too your delete call does not erase anything.
  • pgvector — you inherit Postgres MVCC. DELETE turns the row into a dead tuple. Plain VACUUM makes the space reusable but does not hand it back to the OS, and only VACUUM FULL rewrites the table. The HNSW index also has to re-wire the graph around every removed node, and that drives the cost. Our vector database primer explains why pgvector is usually the right default anyway.

What survives is not an anonymous number

The usual objection is that a leftover float array is not readable text.

Embeddings can be inverted, though. Morris et al. at Cornell showed this with Vec2Text (“Text Embeddings Reveal (Almost) As Much As Text”, arXiv:2310.06816), which iteratively generates and re-embeds candidate text: the method recovered 92% of 32-token inputs exactly and pulled full names out of clinical notes.

In June 2026 the paper “Ghost Vectors” (arXiv:2606.18497) tested three HNSW implementations. It confirmed that soft-deleted vectors remain physically recoverable when someone reads the raw index files at the storage layer and bypasses the API. Using Vec2Text with no domain-specific fine-tuning, the authors recovered 25.5% of exact person names and 46.4% of geographic locations from a Wikipedia biographies dataset, and 100% of patient age and gender markers on synthetic patient records (Synthea). Anyone with file access can therefore read the person out of the residue, slightly blurred.

What the Regulator Assumes — and Where the Premise Breaks

Germany's Datenschutzkonferenz published its Orientierungshilfe zu datenschutzrechtlichen Besonderheiten generativer KI-Systeme mit RAG-Methode (Version 1.0) in October 2025. Section 3.5 says on deletion:

DSK, OH RAG, §3.5. „Auch können Referenzdokumente und Einträge in der Vektordatenbank gelöscht werden. Die Löschung erfolgt technisch durch Löschung von Einträgen in einer Datenbank und das Entfernen aus den Referenzdokumenten. Diese Einträge sind direkt adressierbar und damit auch personenbezogene Daten gezielt löschbar.“ — “These entries are directly addressable, and personal data is therefore selectively erasable.”

The paper is careful elsewhere, and the sentence is not wrong. Entries in a vector store are directly addressable, and that makes RAG more tractable than a fine-tuned model. The DSK explicitly directs its scepticism at the language model and notes that the problems with deleting data from the language model remain regardless of the advantages of a RAG system. We share its view of RAG as the more privacy-friendly architecture.

The wording falls short on one technical point. Addressability is an API property, erasure a storage property. Section 3.5 describes a system in which removing an entry also removes the data. That holds for a row in a classical database and does not hold for a vector in an HNSW segment. A controller who reads §3.5 literally calls delete(), documents that the entry is gone from the index, and reasonably considers the request closed. They are wrong, and the section does not warn them.

Anyone who argues that the leftover vector is no longer personal data is making an anonymity argument and no longer a deletion argument, judged against Recital 26 GDPR and “all the means reasonably likely to be used”. The EDPB's Opinion 28/2024 addresses trained models rather than vector stores, so it does not govern this case directly. It does show how supervisory authorities apply that test: paragraph 43 requires the likelihood of extraction to be “insignificant” for any data subject, and footnote 29 to paragraph 38 clarifies that extraction includes personal data being deduced from the model itself “with little or no use of the query interfaces”. For a vector database, the counterpart is reading the index file off the disk. Anonymity is hard to claim against published inversion results.

The deadlines run regardless. Art. 17(1) GDPR requires erasure without undue delay, and Art. 12(3) gives you one month to answer the request, extendable by two further months only for complex or numerous requests. Neither deadline waits until a segment happens to fill up.

How You Actually Delete

Force the compaction, then measure it

The sequence is the same in every engine: delete, force the rewrite, then read the storage layer back and confirm the result. Do not rely on the background job.

  • Qdrant — delete the points, then make the segment meet the conditions. Any collection-update operation triggers the optimizers, and through the collection's optimizer config you can temporarily tighten deleted_threshold and vacuum_min_vector_number far enough that a small deletion clears the bar. Read the segment stats before and after, then restore your normal thresholds.
  • pgvector — DELETE, then VACUUM FULL if you need the table physically rewritten; the command rewrites the table and builds new indexes for it, so no separate REINDEX is needed afterwards. The gentler variant from the pgvector documentation, REINDEX INDEX CONCURRENTLY followed by a plain VACUUM, rebuilds the HNSW index but does not rewrite the table itself. VACUUM FULL takes an exclusive lock and rewrites the whole table, though. It therefore belongs in a maintenance window and cannot be fired on request.
  • Weaviate — here you control the tombstone cleanup cycle. Set its interval short enough that the cleanup physically removes a deletion inside your response window, and check that the per-cycle limits do not starve it on a large index. The documentation describes this cleanup for the HNSW index. Check separately whether the object data has left the disk as well, because in a report on the Weaviate forum the size of the LSM stores stayed unchanged after cleanup cycles had completed.
  • Chroma and FAISS — neither offers a forced-compaction path for the HNSW index that you should rely on; Chroma’s vacuum cleans up the SQLite side and, according to the bug report above, not the index. Rebuild the collection or index from source without the affected chunk, swap it in, and destroy the old files. The rebuild is the deletion procedure here, so budget for it.

What I would not do: set deleted_threshold to near-zero globally so “deletes always compact”. The optimizer then rewrites segments continuously on a busy collection, and you pay for it permanently in latency and I/O, to serve a request that reaches you a handful of times a year. Force the compaction per request, prove it, and put the thresholds back.

When you cannot force it: crypto-erasure

Some systems do not let you force compaction: an append-only index, an immutable backup, or a store that does not expose the setting. There you make the bytes useless instead of removing them. Encrypt the vectors under a key that belongs to an epoch or a data subject, and destroy the key on erasure. The Ghost Vectors authors implement this as Epoch Key Rotation and measure roughly 0.005 ms per record; recovery of personal data drops to zero, and the scheme emits a signed cryptographic proof of the deletion event.

Crypto-erasure is only as strong as your key custody. If a copy of the key survives in a key-vault backup, an escrow, or an old KMS snapshot, you have destroyed nothing. A key per epoch also erases only whole epochs. Erasing one data subject means keying per subject, which costs you, or re-encrypting the epoch. Whether an authority accepts crypto-erasure as erasure within the meaning of Art. 17 or treats it as a mere security measure is, moreover, not uniformly settled. Use it where physical rewrite is impossible, and not as the default.

The surfaces everyone forgets

Compacting the live segment is the smaller part of the work. Art. 17 requests fail at the copies:

  • Snapshots — a snapshot taken before the deletion contains the vector, complete and unmarked. Deleting from the live collection does not change it.
  • Replicas — every node keeps its own segments and its own optimizer state. Compacting the leader does not compact the follower.
  • Backups — especially incremental ones, where the deleted vector survives in the chain of earlier increments. Crypto-erasure is usually the fitting method for backups.
  • Write-ahead and ingestion logs — the Chroma issue above shows it: the chunk was gone from the index and still sat in a queue table as plain text.
  • Retrieval logs — most RAG systems log the retrieved top-k chunks for debugging and evaluation. That log holds a plaintext copy of the passage you just erased.
  • Stored model outputs — saved conversations in which the assistant quoted the chunk verbatim. The vector is gone, and the answer that recites it is still in your chat history table.

These copies arise in any system that copies data for good reasons. Design erasure in from the start instead of bolting it on. We make the same argument about GDPR as an architecture question.

The Löschnachweis: What the DPO Hands the Authority

When a German supervisory authority asks how you complied, the sentence “we called the delete endpoint and it returned 200” documents only what an API did. The file needs a record that shows the storage layer before, the forced compaction in between, and the storage layer after. It is signed so that nobody can quietly improve it later.

erasure-record.json
{
  "request_id": "ART17-2026-0142",
  "subject_ref": "hmac-sha256:9f2b8c...e41d",
  // keyed pseudonym, not the name — a bare hash of a
  // name is brute-forceable. Still personal data.
  "received_at": "2026-07-02T09:14:00Z",
  "legal_basis": "GDPR Art. 17(1)(a)",
  "collection": "kb_support_de",
  "chunks_matched": 7,
  "api_delete": {
    "at": "2026-07-02T09:31:12Z",
    "effect": "tombstoned — not yet physically removed"
  },
  "segments_before": [
    {"id": "seg-a1", "vectors": 200000, "deleted": 7}
  ],
  "compaction": {
    "forced": true,
    "method": "optimizer thresholds lowered, then restored",
    "finished_at": "2026-07-02T09:48:57Z",
    "segments_rewritten": ["seg-a1"]
  },
  "segments_after": [
    {"id": "seg-b7", "vectors": 199993, "deleted": 0}
  ],
  "downstream": {
    "replicas_confirmed": ["node-1", "node-2"],
    "snapshots_purged": ["snap-2026-06-30"],
    "backups": {"method": "crypto-erasure",
                "key_epoch": "2026-Q2",
                "key_destroyed_at": "2026-07-02T10:02:00Z"},
    "retrieval_logs_purged": true,
    "stored_outputs_redacted": 2
  },
  "verified_by": "l.friedrich",
  "signature": "ecdsa-p256:MEUCIQD..."
}

The lines segments_before, compaction and segments_after carry the proof, and everything else is context. They turn “we deleted it” into the statement “this segment held the record, we forced the rewrite at this time, and the rewritten segment does not”. A DPO can put this Löschnachweis in front of an authority.

For this you must be able to read segment statistics, change optimizer configuration, enumerate your replicas and snapshots, and destroy backup keys. A managed multi-tenant vector service typically gives you an API acknowledgement and a data processing agreement, but no segment-level evidence you would sign your name under. Some vendors expose more than others, and asking for it belongs in every procurement. The reliable version of this artefact needs access to the storage layer, though, which in practice means running it where you control the disk.

The artefact has a limit too. It proves that the segment was rewritten, and it does not prove that no copy ever left the building, as an export to someone's laptop, a debug dump or a screenshot. Deletion evidence covers what your system did, and not what your people did.