You are reading the documentation of OpenCTI 7.260811 LTS · 7.260811.0-lts.1, supported until 2027-09.Latest is 7.261119.0 →
How-to guide

Delete and restore knowledge

Delete entities and relationships in OpenCTI, find them in the trash, and restore them or delete them permanently before the retention period ends.

OpenCTIFor CTI analysts and administrators

An entity, relationship or sighting you delete in OpenCTI goes to the trash, where anyone with the Delete knowledge capability can restore it, with its relationships and files, for 7 days by default. After that, or once someone deletes it permanently, it is gone. This page shows how to delete, restore and purge, what the trash does not keep, and how administrators change the delay.

You deletedCan you get it back?Who can restore itFor how long
An entity, a relationship or a sighting, one at a time or in bulkYes, from Data, then Trash, with its relationships and filesAny user with Delete knowledge who can see its markings, not only the person who deleted it7 days by default, as the administrator sets
An inferred relationshipNo need: the rules engine creates it again while its facts hold
A dashboard, an investigation, a setting or another platform objectNo: it is deleted at once
Knowledge deleted by a connector, by platform synchronization or by a retention policyNo: it is deleted at once

Before you start

  • Your role has the Delete knowledge capability. It also opens Data, then Trash.
  • The trash is on by default. When an administrator turns it off, every deletion is permanent and the Trash menu disappears.

What deleting does

Deleting an entity also deletes every relationship and reference attached to it. The deletion is final for the rest of the platform: it is written to the stream, so playbooks react to it and synchronized platforms delete the object too. The trash only keeps a copy you can restore.

Not everything goes to the trash, as the table above shows. The More information button next to the Trash title recalls these rules on screen. Deleting a dashboard also deletes its public dashboards, with no way back.

Delete knowledge

  • One object: open it, open its actions menu (⋮) and choose Delete.
  • Many objects: select them in any list and click the delete button in the toolbar. OpenCTI deletes them in a background task.

Restore or purge from the trash

Each line of Data, then Trash is one delete operation: the main object with all the relationships and references deleted with it. A line shows the type and name of the main object, who deleted it, when, and its markings. A line inherits the markings of its main object, so you only see what you could see before the deletion.

  1. Open Data, then Trash. Search, filter or sort to find the object.

  2. Open the menu at the end of its line and choose Restore, or Delete permanently.

    OpenCTI 7.260811.0-lts.1
  3. Confirm. The dialog says how many relationships and references come back or go away with the main object.

To act on many lines, select them with their checkboxes and use the toolbar: OpenCTI restores or purges them in a background task.

ExampleBring back an IP address deleted by mistake

An analyst deleted the IPv4 address 203.0.113.45, taking it for a typo. Two days later, a partner confirms that it is a Velvet Harbor server. In Data, then Trash, add two filters:

  • Deleted entity type, operator Equals, value IPv4 address
  • Deletion date, operator Within, From now-7d To now

The line of 203.0.113.45 shows who deleted it and when. Open its menu, choose Restore and confirm: the address comes back with its relationships and files, and the reports that contained it show it again. If the restore fails because an object at the other end of a relationship is in the trash too, restore that object first.

Restore creates the object again with the information it had, its relationships and its files. Delete permanently removes the object, its relationships and its files. It cannot be undone.

When a restore fails

A restore brings back the object and all its relationships in one pass, or nothing. It fails when:

The message saysWhat to do
A relationship targets deleted elementsThe object at the other end is in the trash too. Restore it first, then retry
A target element has been permanently deletedThe other end is gone for good. The object cannot be restored
A duplicate entity or relationship existsThe same object was created again since the deletion. Merge or update that one instead

Restoring one object never restores the other objects it was linked to: restore each of them yourself, in order. Avoid restoring an object with thousands of relationships, which puts the platform under heavy load.

Change how long the trash keeps objects

This section is for administrators. The garbage collection manager deletes objects permanently 7 days after their deletion. Three settings shape the trash:

Key (environment variable)DefaultEffect
garbage_collection_manager:deleted_retention_days (GARBAGE_COLLECTION_MANAGER__DELETED_RETENTION_DAYS)7Days an object stays in the trash before it is purged
app:trash:enabled (APP__TRASH__ENABLED)truefalse turns the trash off: every deletion is permanent, and the purge stops too
garbage_collection_manager:enabled (GARBAGE_COLLECTION_MANAGER__ENABLED)truefalse stops the purge: the trash keeps everything until someone deletes it permanently

See the configuration reference.

ExampleKeep deleted knowledge for 30 days

Your team reviews deletions once a month, and seven days are too short to catch a mistake. Set the delay to 30 days in the environment of the platform container:

services:
  opencti:
    environment:
      - GARBAGE_COLLECTION_MANAGER__DELETED_RETENTION_DAYS=30

Or in config/production.json:

{
  "garbage_collection_manager": {
    "deleted_retention_days": 30
  }
}

After a restart, the trash manager purges an object 30 days after its deletion. The trash grows accordingly: it still holds every object deleted in the last month, with its relationships.

Warning

The trash protects against mistakes, not against data loss. Keep backing up your databases.

What's next

NextSet up your profile
OpenCTI
Cyber threat intelligence as a knowledge graph: ingest, analyze, automate, share.

Published

Overview