Documentation Index
Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
Use this file to discover all available pages before exploring further.
cognee.forget()
Description
forget() is the unified deletion API in Cognee v1.0.
- Use it to remove a single data item from a dataset.
- Use it to delete an entire dataset.
- Use
everything=Trueto remove all memory owned by the current user. - Use
memory_only=Trueto clear graph and vector memory while keeping raw dataset records so the content can be reprocessed.
Parameters
Specific data item to remove. Requires
dataset to also be set.Dataset name or UUID. When used alone, deletes the whole dataset. When paired with
data_id, deletes only that item from the dataset.Deletes all datasets and memory owned by the current user.
Deletes only graph and vector memory for the target dataset or data item while keeping underlying dataset records.
Runs the operation under a specific user context instead of the default user.
Return value
forget() returns a summary dictionary. Depending on the mode, it includes fields like status, dataset_id, data_id, or datasets_removed.