tg-delete-collection
Deletes a collection and all its data.
Synopsis
tg-delete-collection COLLECTION [options]
Description
The tg-delete-collection command permanently deletes a collection and all associated data from TrustGraph, including documents, embeddings, knowledge graph triples, and other stored data.
Warning: This operation is irreversible. All data in the collection will be permanently lost.
Options
Required Arguments
| Option | Description |
|---|---|
COLLECTION | Collection ID to delete |
Optional Arguments
| Option | Default | Description |
|---|---|---|
-u, --api-url URL | $TRUSTGRAPH_URL or http://localhost:8088/ | TrustGraph API URL |
-t, --token TOKEN | $TRUSTGRAPH_TOKEN | Authentication token |
-w, --workspace WORKSPACE | $TRUSTGRAPH_WORKSPACE or default | Workspace identifier |
-y, --yes | false | Skip confirmation prompt |
Examples
Delete with Confirmation
tg-delete-collection old-research
Delete Without Confirmation
tg-delete-collection old-research -y
Delete with Specific Workspace
tg-delete-collection test-data -w developer -y
Environment Variables
TRUSTGRAPH_URL: Default API URLTRUSTGRAPH_TOKEN: Default authentication tokenTRUSTGRAPH_WORKSPACE: Default workspace identifier
Related Commands
tg-set-collection- Create or configure collectiontg-list-collections- List all collections
API Integration
This command uses the Collection Management API to permanently delete collections and all associated data.