All Products
Search
Document Center

Object Storage Service:delete-vectors

Last Updated:Feb 27, 2026

The delete-vectors command deletes specified vector data from a vector index. This command calls the DeleteVectors API operation.

Warning

The delete operation is irreversible. Deleted vector data cannot be recovered. Use this command with caution.

Prerequisites

  • You have installed and configured ossutil. For more information, see Install ossutil.

  • The vector bucket and vector index already exist.

Permissions

By default, an Alibaba Cloud account has all permissions. A Resource Access Management (RAM) user or RAM role has no permissions by default. The Alibaba Cloud account or an administrator must grant permissions using a RAM policy or a bucket policy.

APIActionDescription
DeleteVectorsoss:DeleteVectorsDeletes vector data from a vector index.

Command syntax

ossutil vectors-api delete-vectors --bucket <bucket-name> --index-name <index-name> --keys <key1,key2,...> [flags]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the vector bucket.
--index-namestringYesThe name of the vector index.
--keysstringsYesA comma-separated list of vector primary keys to delete. You can specify 1 to 500 unique keys per request. If a specified primary key does not exist in the index, no error is reported and no result is returned for that key.

For more information about the supported global command line options, see Global command line options.

Examples

Delete multiple vectors

Delete vectors with the primary keys key and key1 from the index named index in the vector bucket named examplebucket.

ossutil vectors-api delete-vectors --bucket examplebucket --index-name index --keys key,key1

Delete a single vector

Delete a vector with the primary key doc-embedding-001 from the index named my-index in the vector bucket named my-vector-bucket.

ossutil vectors-api delete-vectors --bucket my-vector-bucket --index-name my-index --keys doc-embedding-001

Limits

ItemLimit
Number of keys per request1 to 500

Related commands

CommandDescription
put-vectorsWrites vector data to a vector index.
get-vectorsRetrieves vector data from a vector index.
query-vectorsQueries for similar vectors in a vector index.