# Serverless: How to Delete specific records by metadata?

**URL:** <https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134>\
**Category:** Support\
**Tags:** vector-database, serverless\
**Created:** [January 17, 2024, 10:09am UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134 "2024-01-17T10:09:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rd.intermac](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/rd.intermac/32/1903_2.png) [@rd.intermac](https://community.pinecone.io/u/rd.intermac)\
**Post date:** [January 17, 2024, 10:09am UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134/1 "2024-01-17T10:09:30Z")

</div>

Hi Pinecone Support,

I recently upgraded to the serverless version of Pinecone and encountered an issue with deleting specific vectors. In the free version, I used metadata (UserID and filename) to identify and delete specific vectors, as shown in the following code snippet:

```auto
const fileToDelete = user.files.find(file => file.fileid === fileId && file.filename === filename);

// Delete file from Pinecone
const pineconeIndex = pinecone.Index(PINECONE_INDEX_NAME);
const deleteRequest = {
  namespace: PINECONE_NAME_SPACE,
  filter: {
    'userId': { $eq: fileToDelete.userId },
    'filename': { $eq: fileToDelete.filename },
  },
};
await pineconeIndex._delete({ deleteRequest: deleteRequest });

```

However, I understand from the ([Manage RAG documents](https://docs.pinecone.io/docs/manage-rag-documents#delete-all-records-for-a-parent-document)) that serverless indexes do not support deletion by metadata. Could you please confirm if this is the case? Additionally, I would appreciate any guidance or examples on how to implement record deletion by ID prefix, as suggested in the docs, to achieve similar functionality.

Thank you for your assistance.

Best regards, Robin

---

<div class="post-metadata">

**Author:** ![zeke](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zeke/32/4257_2.png) [@zeke](https://community.pinecone.io/u/zeke)\
**Post date:** [January 26, 2024, 8:39pm UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134/2 "2024-01-26T20:39:10Z")

</div>

Hi @rd.intermac, apologies for the late reply!

You are correct that serverless indexes do not support delete by metadata functionality. For a complete list of serverless index limitations, many of which only apply to the ongoing public preview period, please see [Limits](https://docs.pinecone.io/docs/limits#serverless-index-limitations).

You can find an example of fetching the records by prefix at [Fetch all records for a parent document](https://docs.pinecone.io/docs/manage-rag-documents#fetch-all-records-for-a-parent-document). You can then take the IDs you fetch and [Delete specific records by ID](https://docs.pinecone.io/docs/delete-data#delete-specific-records-by-id).

You may find it helpful to review the [List](https://docs.pinecone.io/reference/list) and [Delete](https://docs.pinecone.io/reference/delete) operations in the API Reference. Let us know if you have any questions!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/pinecone/original/1X/d16664eba369eeee623700cf12feab5562b37eaf.jpeg) [@system](https://community.pinecone.io/u/system)\
**Post date:** [January 30, 2024, 11:23pm UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134/3 "2024-01-30T23:23:52Z")

</div>

Closed on January 30, 2024, 11:23pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![perry](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/perry/32/1729_2.png) [@perry](https://community.pinecone.io/u/perry)\
**Post date:** [June 9, 2025, 12:30pm UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134/4 "2025-06-09T12:30:07Z")

</div>

Pleased to announce that Pinecone now supports delete-by-metadata on all indexes, including Serverless!

---

<div class="post-metadata">

**Author:** ![zeke](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zeke/32/4257_2.png) [@zeke](https://community.pinecone.io/u/zeke)\
**Post date:** [June 18, 2025, 1:57pm UTC](https://community.pinecone.io/t/serverless-how-to-delete-specific-records-by-metadata/4134/5 "2025-06-18T13:57:04Z")

</div>

Hi folks, one minor clarification on @perry’s comment above:

We’re still migrating some serverless indexes in the AWS `us-east-1` and `us-west-2` environments. We paused migrations to focus on stability work and general performance improvements, though we have resumed these efforts.

All serverless indexes will soon be migrated to our [new architecture](https://www.pinecone.io/blog/optimizing-pinecone/) that supports delete-by-metadata!
