cognee.prune
Static class with methods for cleaning up Cognee data and system state.
Methods
prune.prune_data()
await cognee.prune.prune_data()
Removes all user data (datasets, ingested documents) while keeping system
configuration intact.
prune.prune_system()
await cognee.prune.prune_system(
graph: bool = True,
vector: bool = True,
metadata: bool = False,
cache: bool = True,
)
Cleans up system resources selectively.
Remove all graph database data.
Remove all vector store data.
Remove metadata/relational database data.
Examples
import cognee
# Full reset: remove everything
await cognee.prune.prune_data()
await cognee.prune.prune_system(metadata=True)
# Just clear graph and vector stores (keep metadata)
await cognee.prune.prune_system(graph=True, vector=True, metadata=False)