milvus-logo
LFAI
< Docs

drop_collection()

This operation drops a specific collection.

Request Syntax

drop_collection(
    collection_name: str,
    timeout: float | None,
    using: str = "default",
)

PARAMETERS:

  • collection_name (str) -

    [REQUIRED]

    The name of a collection to delete.

  • timeout (float)

    The timeout duration for this operation. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.

  • using (str) -

    The alias of the employed connection.

    The default value is default, indicating that this operation employs the default connection.

RETURN TYPE:

NoneType

RETURNS:

None

EXCEPTIONS:

N/A

Examples

from pymilvus import connections, utility

# Connect to localhost:19530
connections.connect()

# Drop a specific collection
utility.drop_collection(
    collection_name="test_collection",
)

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?